Articles Anywhere

Resize picture and add a alt and title to image

4 months 6 days ago #89618

Laurent's Avatar Laurent

Hello,

The resize feature is great for image, is it possible to combine this with alt and title image attribute, i mean create a tag like that :

[image-prod width="570" height="559" alt="[title]" title="[title]"]

Thanks.

4 months 6 days ago #89619

Andrea Malalana's Avatar Andrea Malalana Moderator

There is no need. You can set the Title to automatically be the Title of the article.

See: www.regularlabs.com/extensions/articlesa...alt-title-attributes

4 months 6 days ago #89620

Laurent's Avatar Laurent

Yes ok but in a specific case on the website i don't want to automatically add this.

Thanks.

4 months 6 days ago #89621

Peter van Westen's Avatar Peter van Westen Admin

You could either achieve this using a custom override.

Or using the new dev version you can achieve this in 2 other ways:

1) Override the "Default Alt/Title Values" setting via the Data Tag, using auto_titles="article":

[image-prod width="570" height="559" auto_titles="article"]

2) Create your own html <img> tag by making the Data Tag only output the url, using output="value":
<img src="[image-prod width="570" height="559" output="value"]" width="570" height="559" alt="[title]" title="[title]" />

Please try the latest development version from:
www.regularlabs.com/development-releases

4 months 6 days ago #89622

Laurent's Avatar Laurent

Ohh thanks, i 'll try that.

4 months 6 days ago #89623

Laurent's Avatar Laurent

I try the 2 ways, excellent.

Thanks. 🙂 👍

4 months 5 days ago #89642

Laurent's Avatar Laurent

For info with JCE it is format like this but it work :

<img src="[image-prod width=&quot;570&quot; height=&quot;559&quot; output=&quot;value&quot;]" width="570" height="559" alt="[title] [type-prod]" title="[title] [type-prod]" />

4 months 5 days ago #89643

Andrea Malalana's Avatar Andrea Malalana Moderator

You can also use single quotes for cases like this:

<img src="[image-prod width='570' height='559' output='value']" width="570" height="559" alt="[title] [type-prod]" title="[title] [type-prod]" />

4 months 5 days ago #89644

Laurent's Avatar Laurent

OK, thanks. 🙂 👍