Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Steven Harland 78 posts 495 karma points c-trib
    Sep 04, 2015 @ 08:03
    Steven Harland

    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:

    1. Why would the thumbnail not be getting updated?
    2. 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.



  • Marc Goodson 993 posts 6565 karma points MVP 4x c-trib
    Sep 07, 2015 @ 18:48
    Marc Goodson


    will return the file


    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 should recreate the image based on the new translated image file

  • Steven Harland 78 posts 495 karma points c-trib
    Sep 08, 2015 @ 07:32
    Steven Harland

    Thanks Marc, that's done the trick.

Please Sign in or register to post replies

Write your reply to: