Resized files getting updated time stamp, but they're the same exact file

I’m not an experienced hugo user and still am learning as I try out new things.

One issue is when I run hugo to regenerate my site it resizes certain image files (used as featured images), but because the original file has not changed what is being resized ends up being the same exact file in the end. So all this work has been done for nothing but what makes this worse is that when I upload my site to the server I only want to update files that have changed or have a newer source date. Since Hugo is recreating the file then the upload program thinks the file has been updated and then sends the file again.

Somehow I need to tell Hugo to keep the original file unless it actually has been resized and is an actual different file from the one before.

A byte-for-byte comparison would be required because I have had files end up being the exact same size while the contents have been changed. So in the end the file has to be resized and then compared before you’d know if it were a duplicate or not.

How do you upload your site to your server?

I use filezilla. There are options to set using that which allow me to always overwrite but that takes way too much time to do for only a few changes. Another option when the file exists is to overwrite if the source file is newer which would be perfect except for the case where time stamps are updated. The other option is if source file is newer or size is different. etc.

Do you have shell access to your server?

No shell access.

Contact your hosting provider to see if shell access can be enabled.
Then you can use rsync with the checksum option.

I’d say it is very unlikely.

You have a deployment issue, not a Hugo issue.

Older versions of the theme didn’t have this issue until the theme author changed things to using the featured image and resizing.

The issue to me is that once a resized image is generated it shouldn’t be overwritten if it already exists - if I want to recreate that image myself or clear that out locally before I regenerate the site that is one thing, but I don’t want Hugo changing existing content once I’ve uploaded it.

Perhaps you’d understand this more from an auditing perspective? I don’t want content to change without it being looked at…

I guess one way of preventing this problem is for me to change the permissions of the folder so that Hugo can’t update those files at all, but I’m not sure Hugo would notice that or still work or give errors.