Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP image optimiser

Utilising dropzonejs and ImageMagik a simple php solution to be able to easily optimise images

The use case of this was to be able to easily optimise images before uploading them to a website, to make sure they are small and snappy. Generated images for the website were ~3mb in size, and the website makes heavy use of images (e-commerce store) so having lots of large images isn't ideal. I was manually doing the optimisation, but figured if I made something I could host somewhere, the content editor could resize the images themselves!

This is really adapted to my needs. Images are always coming at the same size dimension and format What I am doing to the images:

  1. Resizing image to specified size (squared)
  2. Striping the image of any meta data
  3. Converting to JPEG
  4. setting quality of output to 85%
  5. Making the image a progressive jpeg

Doing these things is optimising the images from ~3mb in size down to 132kb (resizing to 1024x1024) and 37kb (resize to 512x512)

Installing

  • You will obviously need php, and php Imagick.
  • Ensure you have updated your upload limits in php.ini or .htaccess to allow for larger files

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages