I have a site with 1,000s of contact images. I'm using a Contact_Image crop when displaying them. This crop was at 100x100 pixels in size, but now I need to update this to 100x150. I've tried using the Create Crops tool, but I don't think that this is designed for this purpose, i.e. I don't think it recreates crops in this situation? Please correct me if I'm wrong!
I tried deleting all Contact_Image crops from the file system but the recreated crops are incorrect. I can see that in the umbraco.config the crop exists and has the x and y co-ordinates in there, and I don't know how I can update these properly.
Create Crops should work in this situation. Did you watch this demo to see what it can be used for? http://www.screenr.com/0zUs
However it's an old package and I don't think it works in Umbraco v6, but for v4 it's no problem. I haven't tested it on v6, because when I switched to v6 I started using CropUp.
Anyway, looking at that video and reading the explanation of what Create Crops does (the text that appears below the Create Crops button) it doesn't seem to me like Create Crops will recreate existing crops, and the video shows only new crops being added. I have shared code that relies on the name of the crop being the same, but the size needs to be updated from what is currently in umbraco.config and on the file system. Do you have any idea how I could achieve that?
I have the same issue. 1000+ images in the media section, added a new crop alias but the crops aren't automatically available - it seems to need each image re-saving manually to generate the crop data.
Has anybody found a way to automatically regenerate crops?
Thanks Jeroen, I watched the screenr but was a bit unsure as to whether that package adds a proprietary level of crops on top of the core cropper values. Does it literally just add the required JSON to all of the media items, same as the standard cropper?
The other question is, will that package work with 7.1.3?
Sorry Create Crops won't work on v7. This is an old topic so I though you talked about the Image Cropper that is part of the v4 and v6 core. I don't have a solution for the v7 Image Cropper.
You could have a look at the Create Crops source. There is some code that get's all the media items (with the old API) and than resave each media item to make sure the crops are available. It also does some other stuff but that might not be necessary if only saving is enough.
I'm not sure if it will help but for the built in Image Cropper, I created a event handler which when a data type is saved and is of type Umbraco.ImageCropper, all content, media and member items using that data type will have their image crops synced to the pre value crops stored in the data type being saved.
Automatically update all crops?
Hi all,
I have a site with 1,000s of contact images. I'm using a Contact_Image crop when displaying them. This crop was at 100x100 pixels in size, but now I need to update this to 100x150. I've tried using the Create Crops tool, but I don't think that this is designed for this purpose, i.e. I don't think it recreates crops in this situation? Please correct me if I'm wrong!
I tried deleting all Contact_Image crops from the file system but the recreated crops are incorrect. I can see that in the umbraco.config the crop exists and has the x and y co-ordinates in there, and I don't know how I can update these properly.
Any ideas?
Thanks!
David
Hello,
Create Crops should work in this situation. Did you watch this demo to see what it can be used for? http://www.screenr.com/0zUs
However it's an old package and I don't think it works in Umbraco v6, but for v4 it's no problem. I haven't tested it on v6, because when I switched to v6 I started using CropUp.
Jeroen
Hi Jeroen,
Weird, I thought I'd deleted this post and added it to this thread: http://our.umbraco.org/projects/backoffice-extensions/image-cropper/image-cropper/10914-is-there-a-way-to-republish-all-your-image-crops
Anyway, looking at that video and reading the explanation of what Create Crops does (the text that appears below the Create Crops button) it doesn't seem to me like Create Crops will recreate existing crops, and the video shows only new crops being added. I have shared code that relies on the name of the crop being the same, but the size needs to be updated from what is currently in umbraco.config and on the file system. Do you have any idea how I could achieve that?
Thanks,
David
Oh I meant to mention I'm using v4.11, not v6.x
I have the same issue. 1000+ images in the media section, added a new crop alias but the crops aren't automatically available - it seems to need each image re-saving manually to generate the crop data.
Has anybody found a way to automatically regenerate crops?
Did you try Create Crops like I mentioned here?
Jeroen
Thanks Jeroen, I watched the screenr but was a bit unsure as to whether that package adds a proprietary level of crops on top of the core cropper values. Does it literally just add the required JSON to all of the media items, same as the standard cropper?
The other question is, will that package work with 7.1.3?
Many thanks.
Sorry Create Crops won't work on v7. This is an old topic so I though you talked about the Image Cropper that is part of the v4 and v6 core. I don't have a solution for the v7 Image Cropper.
Jeroen
Ah, that's a shame :( Thanks anyhow.
You could have a look at the Create Crops source. There is some code that get's all the media items (with the old API) and than resave each media item to make sure the crops are available. It also does some other stuff but that might not be necessary if only saving is enough.
Jeroen
Hi,
I'm not sure if it will help but for the built in Image Cropper, I created a event handler which when a data type is saved and is of type Umbraco.ImageCropper, all content, media and member items using that data type will have their image crops synced to the pre value crops stored in the data type being saved.
The code is bit long winded but https://gist.github.com/danlister/2c3ceb1a66a706ef0913 should show work.
Thanks, Dan.
is working on a reply...