• Resolved anita@joli.com.au

    (@anitajolicomau)


    Hello.
    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+]>
    </li>

    itemtag is figure and captiontag is figcaption

    thanks for any light you can throw on this subject.

    https://wordpress.org/plugins/media-library-assistant/

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Suppress image width and height altogether?’ is closed to new replies.