Media Library Assistant
[resolved] Suppress image width and height altogether? (2 posts)

  1. anita@joli.com.au
    Posted 2 years ago #

    I would like to suppress the height and width of the image in thumbnail_content.

    For example:
    <img alt="photo information" class="attachment-thumbnail" src="...">

    Is this possible?
    This is the markup template I am using:

    <li itemscope itemtype="http://schema.org/ImageObject">
    <[+itemtag+] class="thumbnail" itemprop="thumbnail">
       <a title="[+title+]" href="[+link_url+]">[+thumbnail_content+]</a>
      <[+captiontag+] itemprop="caption">[+title+]</[+captiontag+]>

    itemtag is figure and captiontag is figcaption

    thanks for any light you can throw on this subject.


  2. David Lingren
    Plugin Author

    Posted 2 years ago #

    Thanks for your question and for posting the source code for your markup template. Since you are already using a custom template you are well on your way to a solution.

    In the Settings/Media Library Assistant Documentation tab a section titled "Attachment-specific substitution parameters for the markup template Item part" gives the names of all the elements you can use to build custom link and image tags for your [mla_gallery] items. Your example would be coded as:

    <img alt="[+image_alt+]" class="attachment-thumbnail" src="[+thumbnail_url+]" />

    Simply replace the [+thumbnail_content+] parameter in your template with the above < img > tag and you should see the results you want.

    By the way, if you are using a theme that supports HTML5 (see HTML5 Galleries & Captions in WordPress 3.9) [mla_gallery] will use the itemtag="figure" and captiontag="figcaption" assignments by default.

    Thanks again for the question and for your interest in the plugin. I am marking this topic resolved, but please update it if you have any problems or further questions about customizing the markup template.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Media Library Assistant
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic