fb pixel
Skip to main content

New to DJ-Extensions?

How to optimize images with lossless compression

Optimize images

Loading speed of our website is very important for many reasons including users' experience and SEO.

DJ-MediaTools is designed to display images without wasting the loading time and bandwidth.
It serves different image sizes depending on the screen width ( srcset+sizes attributes) uses lazy loading for gallery grid, slideshow, slideshow with thumbnails, tabber and modern slider layouts.

Lossless images compression

Additionally to push the performance to the higher level you can also optimize the images weight without loosing the images quality. Technically it's called lossless compression.

DJ-MediaTools uses free resmush.it webservice to compress the images and you can make it to do it automatically with setting up the cron job in your website hosting panel.

Optimize images manually

If you don't have access to your hosting panel or just want to test this feature just follow these steps:

  1. Go to your Joomla! back-end
  2. Navigate to DJ-MediaTools > Images & CSS cache
  3. Click the Optimize X images button
dj-mediatools images & CSS cache optimize

Please note that you need to clear the images cache once the image optimization is completed. Refer to this article for more info: DJ-MediaTools: Images & CSS cache

Optimize images with the CRON job

Optimizing images manually is not the best solution. If you would like to keep the new galleries optimizing without any extra action you can automate it by adding the cron job in the webhosting control panel.

It may differ depends on what software is used by your hosting provider, but you probably can easily find how to add cron job in the documentation of your hosting panel. You can also ask your hosting provider directly how to add the cron job in the hosting control panel.

More : You can also try using the free cron services that are available on the web. Search for "free cron job" in your favorite search engine for the available services.

When you are ready just follow these steps to automate images optimization:

  1. Go to your Joomla! back-end
  2. Navigate to DJ-MediaTools > Images & CSS cache
  3. Copy CRON URL
dj-mediatools image optimize CRON URL

Here is the example of full cron job command which you can use to optimize new images every day at 1:00 a.m. Just remember to replace the url with your CRON URL.

0 1 * * * wget " http://yourdomain.com/index.php?option=com_djmediatools&task=optimize " -O - > /dev/null 2>&1