Post by Afrofunk » Wed Jun 07, 2023 7:26 pm

We have over 1000 images on our website that are JPG and PNG and over a 100kb, we want to compress these images somehow, Manually will be a long process. Is there another way of doing this? cant find an extension for this purpose? any ideas?. using OC 2.3.0.2

New member

Posts

Joined
Fri Nov 02, 2018 7:15 pm

Post by paulfeakins » Wed Jun 07, 2023 10:14 pm

Afrofunk wrote:
Wed Jun 07, 2023 7:26 pm
We have over 1000 images on our website that are JPG and PNG and over a 100kb, we want to compress these images somehow, Manually will be a long process. Is there another way of doing this? cant find an extension for this purpose? any ideas?. using OC 2.3.0.2
We have code that does this to WebP, but it's not an extension because it's very dependent on the web server software. Feel free to get in touch if you'd like an estimate for applying it to your site: info@antropy.co.uk

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Thu Jun 08, 2023 12:56 am

Do a Google search for "batch image compress", there are a number of tools which allow you to compress whole batches of images in one go.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by halfhope » Thu Jun 08, 2023 4:50 am

HI!
You can use server software (jpegoptim/optipng/etc) via SSH. Like this:

Code: Select all

find /var/www -name "*.jpg" -type f -exec jpegoptim {} \;

Code: Select all

find /var/www -name "*.png" -type f -exec optipng {} \;
Last edited by halfhope on Thu Jul 06, 2023 4:41 am, edited 1 time in total.

My extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by SohBH » Thu Jun 08, 2023 6:58 pm

system\library\image.php

Code: Select all

public function save($file, $quality = 70)
Reupload image/catalog folder for new cache

Business Web Development | Content Creation | Analytics and Reporting | SEO


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 112 guests