RAXO Blog

Latest News and Extension Updates

Update for both Display News modules for Joomla

We are proud to announce the release of new versions for two RAXO All-mode PRO and RAXO All-mode K2 modules at once.
This update is lucky for developers who like to use our module as tool for serious tasks. Now we’ve added new opportunities for you to work with images and have full control over image display.

UPDATE: RAXO All-mode PRO J3.x - version 1.9
UPDATE: RAXO All-mode K2 J3.x - version 1.9

New features:

  • A range of new variables for image display
    Developers now get really cool opportunities to work with images
    • $item->image_thumbnail
    • $item->image_original
    • $item->image_alt
    • $item->image_caption
    • $item->image_attributes

Improved:

Now developers can do really great things with images

Previously, you used only one variable $item->image to display images in the module layouts. This variable was responsible for the complete image output which gave you a full <img> tag with all attributes: src, alt, title and size. When needed this image variable could also contain a link to the article. No worries, this easy way to work with images will be preserved and you can keep working as before.

What is new and useful for developers:

Besides the general variable $item->image that contains all in one, there are new variables, each of which is responsible for a certain part of the image. Due to these new variables you get lots of opportunities to create your code for image output in your own module layouts.

Possible cases where this may be useful:

  • You want to use Lazy Loading for thumbnails.
    To do that you must place image path into data-src attribute and leave src attribute empty.
  • You want to use modern <picture> tag to show full-size original image for some devices, and show thumbnails for other devices. Provide brief text description for your thumbnails with image captions
  • You want to show the original image when clicking on the thumbnail.
  • You care about semantics and think that captioning an image should be done with <figure> and <figcaption> tags.
  • For some design purposes you need <img> tag to have its own CSS class.
  • And many many other work cases that were hard to accomplish before.

Thumbnail cache directory

When creating thumbnails for article images the module saves them in the cache folder. Later, the module uses the existing thumbnails from the cache instead of creating them again. Sometimes there was a problem that thumbnail cache directory couldn’t be created automatically and thumbnails couldn’t be shown. It was annoying because the users had to create this directory manually. Now this issue is resolved and thumbnails work fine right after module installation.

More accurate calculation of thumbnail size & proportions

Besides the standard way to resize and crop image to a specific size, the module supports some other ways to resize images:

  • Reduce images to a certain width;
  • Reduce images to a certain height;
  • Fit image into the certain area defined by width and height.

Regardless of the way, the module should calculate the thumbnail width and hight correctly and use the aspect ratio of the original image, so thumbnails do not look stretched and disproportionate. It’s definitely not an easy task because a user can set any thumbnail size and we have no idea what is the size of the original image and how to relate one to the other.

In this module version we reworked the algorithm for calculating the size of thumbnails. Now it allows you to preserve the original image aspect ratio accurately and minimize the rounding impact on the final thumbnail size.

Update Note

Since there are serious changes in thumbnail creation process, we recommend to clean all of the previously created thumbnail cache before the update.

You can do this using the Media Manager in the Joomla control panel. Go to Menu > Content > Media delete the contents of the images / raxo_thumbs folder.