I'm working on an Umbraco 7.2.8 site that allows the upload of images on the front end. Users also have the ability to crop and rotate their images, also on the front end. This works fine and the thumbnail shown in the media section for that image is a thumbnail for the rotated/cropped version.
I've ported the same functionality to the backoffice as part of a property editor. The server-side code that manipulates and replaces the media file is shared. However, when an image is rotated/cropped through the backoffice the thumbnail is not updated.
This is the thumbnail returned by the following API call:
Is there anything I can do to force the thumbnail to be regenerated? I have tried manually saving the image in the media section but that doesn't work and I need a programmatic approach anyway.
Regenerate Thumbnails in Umbraco 7
Hi all,
I'm working on an Umbraco 7.2.8 site that allows the upload of images on the front end. Users also have the ability to crop and rotate their images, also on the front end. This works fine and the thumbnail shown in the media section for that image is a thumbnail for the rotated/cropped version.
I've ported the same functionality to the backoffice as part of a property editor. The server-side code that manipulates and replaces the media file is shared. However, when an image is rotated/cropped through the backoffice the thumbnail is not updated.
This is the thumbnail returned by the following API call:
So I have a couple of questions:
Thanks.
Steven.
/umbraco/backoffice/UmbracoApi/Images/GetBigThumbnail?originalImagePath=/media/image.jpg
will return the file
/media/image_big-thumb.jpg
if it already exists on disk (which it will do from the first pre-mangled upload)
and so appear incorrect.
If you delete this file on disk after the translation of the original image, and then call:
/umbraco/backoffice/UmbracoApi/Images/GetBigThumbnail?originalImagePath=/media/image.jpg
Umbraco should recreate the image based on the new translated image file
Thanks Marc, that's done the trick.
is working on a reply...