Iâ€™m not sure if it is good practice, Iâ€™d prefer to extend Image class instead of this, but I didnâ€™t arrive to. This MyImage class allows for a caption that you can switch on or off in templates with <% if ShowImagesTitle %><p>$Legend</p><% end_if %>: