You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to add the width and height to the attachment link for each social network. That way everybody will avoid error messages from GTMetrix about missing dimensions for the images.
I have tried adding new vars e.g.
var image_width = element.width; var image_heigth = element.height;
An then add the vars to the attachment with no success. e.g. for instagram
I would like to be able to add the width and height to the attachment link for each social network. That way everybody will avoid error messages from GTMetrix about missing dimensions for the images.
I have tried adding new vars e.g.
var image_width = element.width; var image_heigth = element.height;
An then add the vars to the attachment with no success. e.g. for instagram
post.attachment = '<img class="attachment" src="' + element.images.standard_resolution.url + '' + '" width="' + image_width + '" height="' + image_heigth + '" />';
I have tried as well height() as a function but it doesn't work either.
Please, could you be kind to let me know how to get this done?
It would be very appreciated!
Thanks in advance!
The text was updated successfully, but these errors were encountered: