Hi, Great Plug-in.
I am trying to find the code for the thumbnails.
What would be the code for a thumbnail link and image source?
Hi, Great Plug-in.
I am trying to find the code for the thumbnails.
What would be the code for a thumbnail link and image source?
I tried this but nothing shows up.
<img src="<?php $sizes = get_post_meta($post->ID, 'photoQImageSizes', true);
echo $sizes['thumbnail']['imgTag']; ?>"
imgTag gives you an entire img tag so in your case you should then output that without the <img src=.
otherwise, imgUrl gives the URL only.
Cool! that worked.
Thanks
Another question...
Google page speed reports that I should have image dimensions defined in html.
Is there some way to make sure this is defined?
I tried this inside the <img> tag but no luck.
width="<?php echo $sizes['thumbnail']['thumbWidth']; ?>" height="<?php echo $sizes['thumbnail']['thumbHeight']; ?>"
please have a look at the documentation.
it says
... For every image size there are the following fields: ‘imgTag’, ‘imgUrl’, ‘imgPath’, ‘imgWidth’, ‘imgHeight’...
so it is not $sizes['thumbnail']['thumbHeight'] but rather $sizes['thumbnail']['imgHeight']
You must log in to post.