Alt image tags still not displaying

lee's Avatar

lee

05 Apr, 2018 02:41 PM

I am running version 3.3.6 with WP version 4.9.5.

I have set ALT values in the media library, and have altered the slide markup to look like this:

<div class="rsContent">
  <img src="{{image_url}}" alt="{{alt}}" class="rsImg" />
  {{thumbnail}}
  {{html}}
  <div class="container">
  {{animated_blocks}}
  </div>
  {{#link_url}}
  <a class="rsLink" href="{{link_url}}">{{title}}</a>
  {{/link_url}}
</div>

However, the alt values on the rendered HTML are completely blank still for all images. The Alt tag is a required field on all image elements, so this should be right in the core without the need for any modifications.

How can I get alt tags to display?

  1. Support Staff 1 Posted by Dmitry Semenov on 05 Apr, 2018 03:23 PM

    Dmitry Semenov's Avatar

    Hello,

    Default source of alt attribute for images used by {{image_tag}} is based on a type of slider that you're using.

    • For "custom" type of slider it is based on a title of a slide or its contents, if available.
    • For "[gallery]" it's based on media attachment, and only it supports {{alt}} variable.
    • For "instagram" and "youtube" it's based on photo/video title.

    You can find list of supported variables at http://help.dimsemenov.com/kb/wordpress-royalslider-tutorials/wp-us...

    Dmitry

  2. 2 Posted by lee on 05 Apr, 2018 03:59 PM

    lee's Avatar

    Then this needs to be changed because it makes no sense to use ‘title’ when
    in Wordpress media library there is a standalone attribute input for alt.

    So surely, you should be using that? Can you adapt your plugin so it can
    natively pull it from the Alt value?

  3. Support Staff 3 Posted by Dmitry Semenov on 05 Apr, 2018 04:31 PM

    Dmitry Semenov's Avatar

    "custom" type of slider supports many variations of image sources, not just WordPress media library.

    If you want the plugin to use fields from media library - use type of slider that overrides default WordPress [gallery], it supports {{alt}} as well as{{title}}and{{description}}`.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac