JoomlaPure Image Handling Options

JoomlaPure has a number of options for image handling which can make your site faster loading, easier for administrators and also for users.

Core Overrides

Using the featured image as a teaser

Whilst featured images are a welcome addition to Joomla, having to add different teaser and main images can be a pain.

Enabling this option allows you to just add a main featured image and the same image will be used as the teaser image.

Link the teaser to the article

By default, a teaser image shown in a category list or blog does nothing. Enabling this option makes the image link to the article

Image Resizing

Resize scaled content images

Have you ever had anyone complain that a page is loading slowly, only to find that they have uploaded huge images and used the editor to scale them down with inline styles?

Enabling this option uses the PHP DOMDocument class to scan the article content and check for any images that have width and height attributes. It will then resize these images according to the width and height and then cache them to be used the next time the page is loaded.

Featured images resizing

Using these options you can set a width/height or both and have the images resized and cached accordingly.

This gives list and article layouts a more uniform look and saves the user having to resize all the images by hand before adding them to the site.

Lossless Compression

Using the 'Smush Resized Images' option sends the resized image to Yahoo's http://smush.it service for lossless compression before caching

This makes sure the images are the smallest file size possible whilst also converting to progressive jpg's where appropriate.

Note - The smush.it service has a limitation of 1mb for uploaded images. Anything above this will not be compressed. The images are sent to the service after resizing as it is assumed that the images will be made smaller; when image size is increased it may result in an image with a file size lower than 1mb becoming larger and not being compressed. In the case that smush.it returns a format different to the one sent (such as converting a gif to a png) the image returned will be ignored so links do not break.

Smart Caching

Cached Filenames

Most extensions cache images by placing them in one folder and then making the filenames unique by hashing the name/article id/path to the original image resulting in something like this adccaa9e569cff05de9b4f3b04d_XL.jpg.

JoomlaPure works by keeping the original filenames and then recreating the image path within the image directory and then adding the size values to the end of the filename, so an original image from
/images/headers/blue-flower.jpg
would be cached to
/images/cache/images/headers/blue-flower-w250-h100.jpg
Leaving the filenames meaningful and easy for people and search engines to understand.

Cache Time

There is an option for cache time in the template settings. This is intended for testing purposes only. When set to 0 cached images will not be recreated unless a cached image does not already exist. This prevents having to recreate each image after a certain time period which can slow down a page when used in conjunction with the compression service and cause more load on the server.