Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to add width and height to the images get from socials? #342

Open
antimatterES opened this issue Aug 22, 2018 · 1 comment

Comments

@antimatterES
Copy link

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!

@antimatterES
Copy link
Author

There is no one to answer this question?
Please, it would be important for the SEO of my website.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant