Uploaded images won't replace old versions if the filename is the same

Hello,

I am having an issue where if I have an image that I uploaded and I want to make changes to it in photoshop and resave and reupload, webflow does not update the changes. It keeps uploading the original version unless I rename the file something else. This can get very annoying when I go through 10-15 minor changes to get the file right and I have that many different files in my folder to upload. Webflow should discard any old version of a file and replace it with the new version.

This happens when I delete the file from webflow and upload it again, not just saying replace this image, thought that causes the same behavior.

Please help!

Thanks,
Dave

Hrm that’s odd. We take a checksum of the file to see if the content of the file is different from a file with the same name that you uploaded before. If it’s different, it should get assigned a new ID and new file name. Can you share the two images?

Sure, I had to start consecutively number them so I have 2 older versions as I was making adjustments. The differences are very subtle but they are different.

Looks like both files have exactly the same size, compression, and format - unfortunately as far as our servers go, they look like the exact same file so there isn’t much we can do until we implement a much smarter file detection method that actually does a binary diff, which is quite complex.

~/Downloads  ᐅ mediainfo d2b5991ad007aa76.png
General
Complete name                            : d2b5991ad007aa76.png
Format                                   : PNG
Format/Info                              : Portable Network Graphic
File size                                : 472 KiB

Image
Format                                   : PNG
Format/Info                              : Portable Network Graphic
Width                                    : 400 pixels
Height                                   : 400 pixels
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 472 KiB (100%)


~/Downloads  ᐅ mediainfo 357d4dd3c2fe40d5.png
General
Complete name                            : 357d4dd3c2fe40d5.png
Format                                   : PNG
Format/Info                              : Portable Network Graphic
File size                                : 472 KiB

Image
Format                                   : PNG
Format/Info                              : Portable Network Graphic
Width                                    : 400 pixels
Height                                   : 400 pixels
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 472 KiB (100%)

I see, I guess I am limited to creating many versions. That really sucks.

I’ve run into this sporadically and the file matching issue explains why it only happened sometimes - presumably on images with very little change.

@brryant, any chance that there’s a config setting to increase the file size granularity to bytes using actual file sizes vs. space on disk, which it looks like may be being used now? It’s not perfect, but it’s highly unlikely that even the most subtle changes wouldn’t change a file by 1 byte, and could be a good temp fix if possible.

@DFink: I don’t know if this is a workable or helpful approach for your needs, but what if you exported to jpg for these instead of png, and varied the quality setting back and forth between say, 70% and 71% alternately as you modify it? (I’m not sure I’m seeing your actual images, they’re drawing on my screen kind of like dark gray carbon fiber textures).

Of course, jpg might be out if you’re really looking at subtle differences being critical for your use - I can’t see any clear differences between the images you posted, but perhaps your site has some extraordinary requirements for them since you’re tuning them up so carefully.

Still a bit of a PIA, but should trigger recognition of file size changes, and also significantly reduce your footprint, if KiB means Kilobyte.

We actually use Byte level granularity. The images above are all exactly 483254 bytes. (they are also really large for background images, so I’d compress them as @ramatsu suggested)

Makes sense that the pngs are weighing in the same since it’s a lossless format. @DFink, if it’s worth anything, I’m a complete image quality nut, but would guess that the difference between these and a jpg at the right compression level not only won’t be noticed by users, but won’t have any unnoticed, subliminal impact either. And there’s an excellent chance that any changes you make will create >0 bytes file size difference, even if you don’t alternate compression levels as I proposed earlier.

Thanks guys, I will try to convert them over from png to jpg. That is what it came as from subtlepatterns.com before I modified it. For other graphics, I must use png to get transparency so there isn’t really another option for that.

I moved 4 posts to an existing topic: Image Optimization Tools