The images uploaded by users may not be of ideal size and may require compression to manage server space. There are some tools available for compressing JPG and PNG files.
Please note that the owner changes to the current username for the file after compression. Please remember to change ownership if required of the file or per folder post compression.
Optimize a jpg image with the same name
Optimize all jpg images in a folder
Optimize an png image with the same name
Optimize all png images in a folder