• I’m using version 1.4.6 of this add on.

    If I have the plugin set to hard crop, custom size of 1000px by 1000px, and then I select an image that is exactly 1000px x 1000px, the plugin creates a new image small-talk_1000x1000_acf_cropped.jpg. This is completely unncessary, it should just use the original image: small-talk.jpg. Similarly if the user crops it to any other pre-existing image size. Also, if it is uploaded at precisely the size that is needed, the crop dialog should never appear.

    Moreover, if a new crop does need to be created, it shouldn’t add _acf_cropped to the end of the file name as it really does look unprofessional and isn’t ideal for SEO. It should just add the size small-talk_921x921.jpg

    This is a great idea for a plugin, but these small things make it a little tricky for us to use.

    https://www.ads-software.com/plugins/acf-image-crop-add-on/

Viewing 10 replies - 1 through 10 (of 10 total)
  • +1 It would be great to get these feature additions implemented. If the original image is the same size as the forced hard crop, it does create a lot of unnecessary images, especially if you have add_image_size setup to create smaller versions of the main crop image.

    The acf_cropped part doesn’t particularly bother me, but perhaps you could have an option for the file extension name in the plugin’s settings page?

    I really like this plugin, is there a github repo setup for contributions to it?

    Thread Starter willryanuk

    (@willryanuk)

    Yes, a github repo would be great. I can see there is an SVN setup but github would be ideal. I do really like this plugin as well, but I have about 8 custom crops via add_image_size so the fact that the plugin creates so many duplicate images is really problematic for us.

    Plugin Author andersthorborg

    (@andersthorborg)

    Hi guys,

    The issue with how to deal with the media library has been present right from the beginning. The reason for the plugin creating a new media item for each crop is that cropping an image in one post could potentially affect other posts using the same image.

    However there are workarounds that I want to make sure that you’re aware of:

    1. There’s an option to hide cropped images from the media dialog under Settings->Media.
    2. There’s an option for each field, where you can choose to not save to the media library. This only creates one image file.

    Best,

    Anders

    Plugin Author andersthorborg

    (@andersthorborg)

    BTW there is a github repo (https://github.com/andersthorborg/ACF-Image-Crop), but it is currently outdated and not in sync with the WordPress one. I am working on getting it up and running with a proper git-svn workflow. I appreciate your interest in contributing!

    Thread Starter willryanuk

    (@willryanuk)

    Hi Anders,

    Thanks for getting back to us. I understand of course, that if you select an image from the media library and choose to crop it to a different size, that new images should be created (as opposed to editing any existing crops) for the reason you mentioned.

    However, if the user does not crop the image at all, it does not need to create a new image. Does that make sense? It’s quite a subtle case, but is quite a common use case. Is there anyway we can easily patch the plugin for this scenario?

    Thanks,
    Will

    Plugin Author andersthorborg

    (@andersthorborg)

    To my knowledge the plugin will not create a new image if the user doesn’t crop it. If that’s the case then it’s definitely a bug.

    Thread Starter willryanuk

    (@willryanuk)

    Hi Anders,

    The plugin does not create new images if you press “Cancel” when the crop dialog appears.

    However, if you:

    1. upload an image at the correct size
    2. the crop dialog appears
    3. user selects the entire image (they have no choice but to select the entire image)
    4. press “Crop”

    the plugin will create a duplicate set of images in the media library.

    I actually think there should be an option whereby the crop dialog only appears if they select an image in the image library that is not the correct aspect ratio and needs to be cropped.

    It would also be great if this plugin could enforce the required image size. i.e. if you need an image that is 200px x 200px, it will not let them publish the post until they have selected a suitable image. This would make the CMS bullet-proof for authors that are a little bit clumsy with their image selection.

    Plugin Author andersthorborg

    (@andersthorborg)

    I see your point.

    I’ve been wanting to improve the “Force crop” part of the plugin to be more dynamic, so I’ll look at this too.

    Best,

    Anders

    Thread Starter willryanuk

    (@willryanuk)

    Thanks Anders. Really appreciated- this plugin is essential for the sort of work we do ??

    Hi Anders,

    Thanks for getting back to us.

    Could you explain this one in a bit more detail please? “There’s an option for each field, where you can choose to not save to the media library. This only creates one image file.” Does this mean if the client uploads the original image, then crops it, the original image is deleted and only the cropped version is saved? I have already enabled the hide images from media library option but for me the issue is disk space, we are using tonnes at the moment.

    Thanks,

    Patrick

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘BUG: Crop creates a new image in the media library unnecessarily’ is closed to new replies.