Skip to content

Releases: BKWLD/croppa

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)

Croppa::delete() now correctly deletes crops

14 Apr 17:30
Compare
Choose a tag to compare
  • Croppa::delete() was intended to delete the src and crops. This restores this functionality (#83)
  • Fixes the redirect for remote crops
  • Throwing a custom exception if the crop already exists (#84)
  • More docs

Fixing the facade's accessor reference

13 Apr 20:50
Compare
Choose a tag to compare
Merge pull request #82 from sdebacker/patch-1

Wrong service name in Facade

4.0

13 Apr 18:17
Compare
Choose a tag to compare
4.0

Flysystem support

In addition to the src_dir being a local path, it can also be an IoC binding name to a Flysystem instance. Thus, your src images (and your crops) can be located on remote disks like S3, Dropbox, FTP, src.

Configuration

With this release major changes were made to the config file as part of the transition to Flysystem and to make the configuration more explicit / less confusing. For instance, the src_dir is no longer an array of paths, there can be only one source. Also, a crops_dir allows you to store the crops in a different directory than the source directory. Read the config file for docs on each option.

Fully dependency injected

The code architecture was rewritten from a single class to multiple that get instantiated using dependency injection through the Laravel container. This will make adding future tests and functionality easier and let people subclass and extend Croppa.

Support `route:cache` to work in L5

13 Apr 16:02
Compare
Choose a tag to compare
  • #81 - Route handling is done with a Controller rather than a closure so applications that cache routes will not get a fatal error
  • Fixing composer.json so that L4 continues to be supported

Fixing image output bug on new service providers

18 Feb 16:23
Compare
Choose a tag to compare

Adding support for Laravel 5

17 Feb 22:55
Compare
Choose a tag to compare