I'm writing a plugin which synchronizes the content from an external database with the Craft database.
For the images I receive URL's to the external image then store them in the temp storage and upload them to Craft assets, which works fine.
I now want to check additionally if the image in the temp already exists in crafts assets and if the images are identical ( checking for file size ).
Ideally comparing the external image and the image in the assets even before saving the external one to the temp.
The file size from the external source is identical to the tmp saved file but after uploading the file to Craft it somehow gets a little bit bigger so checking for the file size doesn't work.
Am I doing something wrong ? Should I check for something else than filesize?
This might be related to this question