Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We're currently in the middle of automating functionality that enriches products with images. Before, for each product, a content editor had to manually upload and select (through Media Pickers) product images. Each product has a lot of varieties in color and characteristics, so this was quite a hassle.
Luckily we are now able to retrieve these images from the suppliers' API. For each product we request at the API we get a list of URL's that we can download. We store these images on a logical location on the server's disk (E.g. /media/productname/color.jpg). This also enables us to generate the URL of the image source without consulting Umbraco and the corresponding Media Picker. So far so good.
However, this approach introduces a problem; when a product's image is updated this way, the URL stays the same and both the Image Processor and the browser still show the old image from the cache. We are trying to solve this problem, but we have the feeling our solution might be a bit devious.
What we are trying so far;
We'd really appreciate some thoughts and ideas on the matter. Is this the way to go? Are there alternatives/solutions we're missing? Etc.
Thanks a lot in advance!
Maybe you can create a custom version of the disk cache for image processor :
You could than create one that inherits the default diskcache and override the IsNewOrUpdatedAsync method to check if the image is updated.
And the update the caching configuration to use your new diskcache implementation : http://imageprocessor.org/imageprocessor-web/configuration/
Will ping James South on twitter to give his thoughts about this.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted