I made some changes and now the script queries the database only when the image is resized.
I also noticed on the old version the metadata was added to the original image every time the script was running, but now this issue is solved as well.
And please excuse my chaotic use of Github. I'm very new to it and haven't figured out how to use it properly.
https://github.com/syamilmj/Aqua-Resizer/pull/49
I made some changes and now the script queries the database only when the image is resized. I also noticed on the old version the metadata was added to the original image every time the script was running, but now this issue is solved as well. And please excuse my chaotic use of Github. I'm very new to it and haven't figured out how to use it properly. https://github.com/syamilmj/Aqua-Resizer/pull/49