how to compress images on centos 7
how to compress images on centos 7
hello
i'm using centos 7 for my website and i tested my site with many tools and they say to compress images because of site slow loading
Is there any package that will compress images by specifying folder? or by using cron or any method?
Thanks
Regards.
i'm using centos 7 for my website and i tested my site with many tools and they say to compress images because of site slow loading
Is there any package that will compress images by specifying folder? or by using cron or any method?
Thanks
Regards.
Re: how to compress images on centos 7
What sort of image files are you using? Almost all of them are already compressed so compressing them again will just waste cpu time. All jpeg, gif, png images are already compressed.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: how to compress images on centos 7
Hi,TrevorH wrote:What sort of image files are you using? Almost all of them are already compressed so compressing them again will just waste cpu time. All jpeg, gif, png images are already compressed.
almost jpg and png images, i already used to compress using php code, but they still are big images and slow down my server on load
som i was reading about https://www.webmaster.net/tutorials/ins ... score.html
your idea?
Re: how to compress images on centos 7
EPEL has jpegoptim-1.4.4-1.el7.x86_64
This is about recompressing your existing image files so that they take up less space so not really anything to do with httpd at all except that it's the guy reading them and delivering them.
This is about recompressing your existing image files so that they take up less space so not really anything to do with httpd at all except that it's the guy reading them and delivering them.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: how to compress images on centos 7
For png you can use : optipng or pngcrush, pngnq, pngquant. I recommend optipng. Go to 'optipng --help' to get more info of compressing.
Re: how to compress images on centos 7
TrevorH wrote:EPEL has jpegoptim-1.4.4-1.el7.x86_64
This is about recompressing your existing image files so that they take up less space so not really anything to do with httpd at all except that it's the guy reading them and delivering them.
This is about re compressing , this is what i need.. all users that will use my website to upload their ad's for sale will go to a folder that i need to re-compress them to make them loading fast for future use
what you think ?
-
- Posts: 2
- Joined: 2022/04/22 20:38:58
Re: how to compress images on centos 7
Hello h0feer,
Install jpegoptim using EPEL:
Code: Select all
yum install jpegoptim
Code: Select all
yum install optipng pngquant
Code: Select all
bash
Copy code
jpegoptim --max=85 /path/to/images/*.jpg
optipng -o7 /path/to/images/*.png
or if you looking for third party image optimization tool such as jpeg compressor with instant delete option right after the compressed the file. I think this guy using same software.
This script based on CentOS 7.
Good luck