skip to Main Content

at the moment I have over 150k thumbnails uploaded on my server. All 150k images are stored in different directories like this ( 2018/03/22/image1/image1.jpg ).

By checking with tools like GTmetrix or PingDom I noticed that each image can be losslessly compressed to have around 5% of reduce for each image.

For any image I can save around 500B, is not much but by considering that the homepage have 80 images, I can save around 40KiB.

I have read a lot of things on web during this days but there are some things/doubts that I still have.

1) Each image is stored in different path, for example ( 2018/03/22/image1/image1.jpg – 2018/03/22/image2/image2.jpg – 2018/03/22/image3/image3.jpg – 2018/03/22/image4/image4.jpg ) – can this create some problems to the performance? By assuming that the homepage load 80 images this means that it load 80 images from 80 different path. By uploading all the images in a single path can have any importance for the performance?

2) Is crazy to think to save all the images to the desktop and use software for windows or mac to bulk optimise all the 150k images and re-upload again to the server. Is there any solution to optimize the images by using cPanel?

3) I see a lot of tools that CloudFlare have but I still not understand if any tool can do this.

Things already try:
– I started to optimise all images by downloading one by one to the Desktop but after around 1 hour I noticed that is crazy.
– I have try to check a lot of tools that CloudFlare provide but I’m still unable to understand if anyone can do this.
– I have try to check the cPanel tools but no one can do this as I have understand.

Any answer will be very helpfu – thanks.

3

Answers


  1. Path shouldn’t have any impact on performance. Cloudflare offers Polish and webP on it’s paid plans:

    https://support.cloudflare.com/hc/en-us/articles/360000607372-Using-Polish-to-compress-images-on-Cloudflare

    https://www.cloudflare.com/plans/

    Login or Signup to reply.
  2. 1) Each image is stored in different path, …. By uploading all the
    images in a single path can have any importance for the performance?

    No

    2) … Is there any solution to optimize the images by using cPanel?

    I don’t know of a cPanel solution, I can think of two other options though.

    You could zip and download the directory holding all your images, unzip it locally, then drop that directory onto a tool like https://imageoptim.com . ImageOptim gives excellent results, then reverse the process and upload the optimised images and overwrite your existing images.

    Another tool would be ShortPixel, it’s a commercial service and looks like it would cost you $99 for 170k images. They have command line tool and a php API: https://shortpixel.com/api-tools

    3) I see a lot of tools that CloudFlare have but I still not
    understand if any tool can do this.

    If it’s an option for you, Google’s PageSpeed modules gives very good results for image compression.

    https://www.modpagespeed.com/doc/filter-image-optimize

    Another suggestion which would give immediate results is to lazy load the images. With this in place, even though your homepage has 80 images, if only 10 of them are in view when the page opens, then just those 10 will be downloaded. There are all sorts of lazy load options available, here are some to get you started.

    Good luck!

    Login or Signup to reply.
  3. The easiest thing to do is use CloudFlare on the domain. With their Pro plan (or better) it will optimize and cache the images for you.

    But if you want to ‘own’ to optimized images you’ll have to re-compress them yourself.

    On Mac I use ImageOptim: https://imageoptim.com/mac

    You’d have to transfer the files to your mac. Run ImageOptim (this will take a REALLY long time). I suggest the following settings…
    enter image description here
    Then transfer the images back to your server.

    If the server is a Windows Machine, you can use FileOptimizer: https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer

    That will process the files directly on the server. It’s convenient – just make sure to give that process lowest priority.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search