Magento and classic servers1 min readUpdated

Optimizing Magento Images

Images play a huge roll when it comes to any site performance.

Uploading perfectly compressed and well balanced images can very time consuming.

Try these simple ssh commands to compress GIF's, PNG's and JPG's from pub/media folder.

Use it with caution because some images can be extremelly compressed and visually ugly.

 

find ./pub/media -iname '*.gif' -exec sh -c 'gifsicle -b -O3 -o "{}.out" "{}"; mv "{}.out" "{}"' \;
find ./pub/media -iname '*.png' -exec optipng -o5 -keep -preserve '{}' \;
find ./pub/media -type f -iname '*jpg' -exec sh -c 'jpegtran -outfile "{}.out" -optimize "{}"; mv "{}.out" "{}"' \;

Did this solve it? If not, tell us what you see and we look at your server.

Open a ticket

Still stuck? Ask a person.

Tickets go straight to the engineers who run ShopWhizzy servers. Tell us the store, what you see and when it started, and we take it from there.