Issue with renaming and uploading images in Sanity Desk.
Last updated: Aug 2, 2023
hello 🙂I tried to solve the problem on my own and with our dev team. but it still doesn't work. Could you please help me with it ... I'm in the Desk surrounding and try to add content. I named images in figma, exported and uploaded them in sanity desk so it looks like in the first image I send with this message. Then I renamed an image like on the second image attached. When I try to upload the renamed image like in the third image attached. It still has the same name as in the first upload as you see in the fourth image. Why? And how can I avoid that?
Aug 2, 2023, 12:03 PM
I have a feeling that this may be because the backend uses SHA-1 hash of the content of the file to avoid have several duplicates of the same content.You can verify this theory by making a tiny change to your image file and see if that results in a new entry. Similar discussions here and here .The Asset URL also uses this SHA-1 hash for the caching logic.
Aug 2, 2023, 2:51 PM
yes, I uploaded a the same image in color instead of black and white and it worked. Thanks! 🙂