Media Library alt tag not taking affect (2 posts)

  1. sdaponte
    Posted 3 years ago #

    I'm using image field so the client can upload their own homepage slider images. When uploading an image through the media library, you are given an option to set an alternate text. However when you do this, and then hit 'use as field value', the changes do not save and the alternate text does not apply.
    The alt text right now is just using the url to the image.

    I'm using this line in my template file to output the image:
    <?php echo(types_render_field("billboard-img", array("arg1"=>"val1"))); ?>

    If there is no way to get this alt text field to work, I can settle with just extracting the url for this, so I could create another field for the alt text.

    <img src='<?php echo(types_render_field("billboard-img", array("arg1"=>"val1"))); ?>' alt='<?php echo(types_render_field("alternate-text", array("arg1"=>"val1"))); ?>' />

    Any ideas?


  2. sdaponte
    Posted 3 years ago #

    I realized that I have to click the "Save All Changes" button in order for the alt text to take affect. In my media library now, the alternate text is displaying as I want it to, but in the markup the alt text is still just the url of the image. What is going on!?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic