Umbraco 7 : Swapping image file in Media breaks image
Hi all,
I believe this is a bug however please move this post if I'm in error.
What I have is a Document Type that accepts a Media Picker field. This Media Picker has a Media File selected. This file for example is called image1.png.
WHat I do is edit the origional image file, perhaps adding a transparent background, and I then save the image as image1.png. Then I goto Umbraco back end and locate the file in Media, I remove the existing image and upload the new one.
This works from the back end view, I save the Media file. I have Image Cropper installed so I make sure to 'touch' the center crop marker before saving. I then goto the Document Type and re-save and publish just in case.
Now when I go to the front end the image file does not display, it is a null. Here's the code I use to display (I iterate the DocTypes to build a list view of the images) :
Here the updated Media in question (awardImage) is NULL. Curiously Rebuilding and cleaning the application does not fix it, however I can add a new image file to Media and change the DocType field to the new file without problems...
Is this a bug with the cache refreshing? perhaps it's becasue I uploaded a different image with the same name so something didn't stick?
I can try deleting the umbraco.config to force a refresh however this isn't practical when handed over to the client and they manage thier images.
Umbraco 7 : Swapping image file in Media breaks image
Hi all,
I believe this is a bug however please move this post if I'm in error.
What I have is a Document Type that accepts a Media Picker field. This Media Picker has a Media File selected. This file for example is called image1.png.
WHat I do is edit the origional image file, perhaps adding a transparent background, and I then save the image as image1.png. Then I goto Umbraco back end and locate the file in Media, I remove the existing image and upload the new one.
This works from the back end view, I save the Media file. I have Image Cropper installed so I make sure to 'touch' the center crop marker before saving. I then goto the Document Type and re-save and publish just in case.
Now when I go to the front end the image file does not display, it is a null. Here's the code I use to display (I iterate the DocTypes to build a list view of the images) :
Here the updated Media in question (awardImage) is NULL. Curiously Rebuilding and cleaning the application does not fix it, however I can add a new image file to Media and change the DocType field to the new file without problems...
Is this a bug with the cache refreshing? perhaps it's becasue I uploaded a different image with the same name so something didn't stick?
I can try deleting the umbraco.config to force a refresh however this isn't practical when handed over to the client and they manage thier images.
Any feedback or input is greatly appriciated!
Danny "Blatant"
Weird, I am now unable to reproduce!
Sorry to have bothered you.
is working on a reply...