• Resolved lenehanj

    (@lenehanj)


    Hi David

    I am displaying the first image of this page:
    https://www.eupati.eu/eupati-news/national-updates/

    …using this shortcode…
    [mla_gallery ids=”12190″ columns=”1″ mla_caption=”{+caption+}” link=”file” size=”medium” mla_markup=figure-blog]

    …and this template…

    Name:
    figure-blog

    Arguments:
    Blank

    Open:
    <div id='[+selector+]’ class=’gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]’ style=”padding:20px;margin-bottom:20px;border: solid 0px #c0c0c0; width:50%;”>

    Row Open:
    Blank

    Item:
    <figure>
    [+image_alt+]
    </figure>

    Row Close:
    Blank

    Close:
    </div>
    <br style=”clear: both” />

    The image that is rendering on the page is a full size image and not the specified “Medium” size in the shortcode.

    I assume there is something incorrect with my template.

    Can you see anything obvious that might be causing the issue?

    Kind regards

    John L

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

    (@dglingren)

    Thanks for your question and for the link to the example on your site; very helpful.

    It looks like the HTML in the Item: section of your template has been distorted in the body of your post. Can you re-post the template surrounded by “code” tags? You can find a Code button at the top of the edit window that will generate them for you. Thanks!

    Thread Starter lenehanj

    (@lenehanj)

    Name:
    figure-blog
    
    Arguments:
    Blank
    
    Open:
    <div id='[+selector+]' class='gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]' style="padding:20px;margin-bottom:20px;border: solid 0px #c0c0c0; width:50%;">
    
    Row Open:
    Blank
    
    Item:
    <figure>
    <a href="[+link_url+]"  class="fbx-link"><img src="[+link_url+]" alt="[+image_alt+]" style="display: block;margin: 0 auto;"></a>
    </figure>
    
    Row Close:
    Blank
    
    Close:
    </div>
    <br style="clear: both" />
    Plugin Author David Lingren

    (@dglingren)

    That’s much better, thanks.

    In your Item section img tag you have src="[+link_url+]". The link_url is set from the hyperlink associated with each item. Since you specified link=file you get the URL of the full-size image file.

    The substitution parameter you want is [+thumbnail_url+], which is set from the thumbnail image displayed for each item. Since you specified size=medium this should be the URL of the medium intermediate size image for the item.

    Try changing your img tag to:

    
    <img src="[+thumbnail_url+]" alt="[+image_alt+]" style="display: block;margin: 0 auto;">
    

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above solution. Thanks for your interest in the plugin.

    Thread Starter lenehanj

    (@lenehanj)

    Perfect, thank you for your help.

    J

    • This reply was modified 8 years ago by lenehanj.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Incorrect thumbnail sizes loading with shortcode’ is closed to new replies.