Hey,
Glad you like the plugin.
Unfortunately, the plugin is not currently designed in a way that allows re-using cropped images. There is an assumption that a cropped image belongs to a parent image, and that a cropped image belongs to a single post.
This functionality was left out because I think it’s hard for content editors to deal with various crops, and they may accidentally crop an already cropped image. This is why right now there is one master image that has various crops.
If I understand properly, you would like the plugin to “remember” the previously cropped image sizes.
So, for example, if I have a field with a 16:9 aspect ratio and I select “Image A” and crop it, the plugin would remember that there is a crop for that aspect ratio.
If I then have another 16:9 field where I select “Image A” again, the plugin would by default offer that same crop (the same coordinates) and if I press crop, it would re-use the already cropped image?
I’m just trying to figure out a way to implement such functionality in a smart way.
I think showing the cropped images in the media gallery and having some way to detect if the image
1. Is a cropped image
2. Has the same aspect ratio
And in that case, automatically selecting the image without showing the cropper would be a kind of workaround to accomplish the same functionality.
Thanks!
If I understand properly, you would like the plugin to “remember” the previously cropped image sizes.
Kinda yes, but it allso has to work with various ratio’s. When you have multiple blocks with different ratio.
Unfortunately, the plugin is not currently designed in a way that allows re-using cropped images. There is an assumption that a cropped image belongs to a parent image, and that a cropped image belongs to a single post.
Not always. We make complete websites and allso make use of pages with let’s say CTA blocks. These blocks often have the same image.
So, for example, if I have a field with a 16:9 aspect ratio and I select “Image A” and crop it, the plugin would remember that there is a crop for that aspect ratio.
What if you have several different ratio crops with the same image?
If I then have another 16:9 field where I select “Image A” again, the plugin would by default offer that same crop (the same coordinates) and if I press crop, it would re-use the already cropped image?
How would you be able to crop a different portion of the image? Just use the recrop?
I’m just trying to figure out a way to implement such functionality in a smart way.
That’s a must of course.
I think showing the cropped images in the media gallery and having some way to detect if the image
1. Is a cropped image
2. Has the same aspect ratio
And in that case, automatically selecting the image without showing the cropper would be a kind of workaround to accomplish the same functionality.
That would be a nice starting point.
Maye we can do something like an extra tab on the media select page:
https://i.ibb.co/8bR6h6j/here.png
Where it says “Previously cropped images” wich would filter out the correct sizes?
This way you can detect if it is previously cropped and skip the crop function.
This would be the best of 2 worlds I think. You still get to choose wich image manually, without the need to crop.
@joppuyo What do you think of the solution i came with?