Skip to main content

Easy Image Caption solves the Joomla 3 - 4 image caption incompatible problem

Published: 07 April 2023
Last updated: 13 April 2023

It is a major defect with Joomla that new migrations, for example from Joomla 3 to Joomla 4, are not compatible with each other.

Joomla 3 and Joomla 4 use different methods of handling image captions. After migrating from Joomla 3 to Joomla 4, Joomla 4 will not show the image captions from Joomla 3 anymore.

Image caption with Joomla 4

Creating image caption is done with <figcaption>

Here is the code if an image created with TinyMCE in joomla 4:

<figure class="image"><img src="/images/%3Cspan%20style="background-color: #ffff00;">?S?.jpg" alt="?A?" width="630" height="359" loading="lazy" data-path="local-images:/?S?.jpg" />

<figcaption>blabla</figcaption></figure>

Here is the code if an image is created with TinyMCE and later edited with the JCE editor. JCE editor will add data-wf-figure="1":

<figure class="image" data-wf-figure="1"><img src="/images/%3Cspan%20style="background-color: #ffff00;">?S?.jpg" alt="?A?" width="630" height="359" loading="lazy" data-path="local-images:/?S?.jpg" /> <figcaption>blabla</figcaption></figure>

Image caption with Joomla 3

Joomla 3 uses a different method, namely: class="caption”

<img src="/images/%3Cspan%20style="background-color: #ffff00;">?S?.jpg alt="?A?" width="300" height="225" class="caption" style="float: left;" title="blabla"/>

EasyImageCaption plugin

We need this plugin in Joomla 4 for displaying the image captions created under Joomla 3. It generates captions from images TITLE or ALT.

How to use EasyImageCaption

  • Download it HERE
  • Set General settings > Copy Image classes to No.
  • If the caption is entered in Advanced > Title with class="caption" you may not also enter a caption with the insert caption button in the JCE editor, than you will get 2 captions below the image:

Solar bikeSolar bikeSolar bike