Skip to content

Releases: BKWLD/croppa

Custom filters and manual rendering

30 Aug 16:57
Compare
Choose a tag to compare
  • Adding custom image filtering options (#123)
  • Adding Croppa::render() method to render crops directly (#111, #124, #125)

Memory limit config & Laravel 5.2 support

29 Feb 16:37
Compare
Choose a tag to compare
  • Allow the required memory to be set (#116)
  • Support Laravel 5.2 via opening up Symfony version constraints (#119)

Lumen support & fixes

22 Jan 18:07
Compare
Choose a tag to compare
  • Adding Lumen support to the provider
  • Fixing issue with deleting crops NOT in a subdir #103
  • Refactoring Flysystem caching adapter support #87

Fixing signing_key reference

30 Jun 20:42
Compare
Choose a tag to compare
Merge pull request #100 from sdebacker/patch-2

signing_key, not secure_key.

Adding signed tokens to generated URLs

29 Jun 17:51
Compare
Choose a tag to compare

Now, by default, urls generated with Croppa::url() will have a ?token=xxxxxxxx parameter added to them. The token is generated by hashing the parameters of your request (src image, dimensions, etc) combined with your Laravel app's encryption key. For example, a new Croppa 4.1 URL might look like:

http://domain.com/uploads/01/08/file-200x100.jpg?token=c21ed23af0228053c10b283a93b30d8c

This prevents the modifying of Croppa parameters after url generation which could lead to malicious users consuming CPU and storage generating unnecessary crops. As such, it more effectively accomplishes what the max_crops config was designed for; max_crops is now disabled by default.

If you are generating URLs outside of Croppa::url(), like the croppa.js module, you can disable this feature by setting the signing_key config to false.

Thanks to Glide for the inspiration for this feature.

Adding a command that deletes all crops

29 Jun 17:51
Compare
Choose a tag to compare

Run php artisan croppa:purge from the CLI to delete all crops. See the README for more info.

Preserving aspect ratio when cropping despite source image size

29 Jun 17:38
Compare
Choose a tag to compare

Previously, if an image was smaller than the requested dimensions, the image was not cropped at all. So if you called Croppa::url($url, 500,500) image but the source was 500x400, you would get the original 500x400 image outputted.

Now, Croppa will give you a 400x400 image. In other words, it is preserving the original aspect ratio despite the source image size. This is important if you are showing a bunch of images in a grid and don't want gaps but you can't be sure that the source images are all big enough.

This release also adds a upscale option that will tell Croppa to scale up images to match your requested dimensions. So, using the example above, with upscale set to 1, you will get a 500x500 image.

Fixes for max_crops config and deleting crops

26 Jun 15:16
Compare
Choose a tag to compare

Also includes better docs and tests for deleting crops in a subdirectory of of the src_dir.

Two new wiki pages were also created:

Fixes trim() option

26 May 15:55
Compare
Choose a tag to compare

Updating PHPThumb and fixing some URL options

12 May 23:13
Compare
Choose a tag to compare
  • Fixes issue where jpgs were being created as pngs
  • Fixes issue where pngs were getting a black background
  • Fixes error when passing in quality and interlace options in the URL
  • Preparing for eventual update to Flysystem CachedAdapter (#87)