Closed BenLubar closed 7 years ago
LGTM @nleush
@BenLubar as I understand you case is about generated widget card with image. I've made some changes to render both <img>
tag and <a>
wrapper in card template: 80de9aba9bf0bcde1a616d52ed408bc638078dd6.
I think it should be better to render in template.
In other cases Iframely doesn't return <img>
embed code to prevent hotlinking by default.
Is it ok for you?
http://iframely.com/debug?uri=https%3A%2F%2Fgoo.gl%2Fphotos%2FPaVEUvB18Kx6HFHAA
The embed HTML generated by iframely is just:
<img src="https://lh3.googleusercontent.com/1GzSADYzry6eMotuohoryDidSH2a3RnD58wvy49JFV5qEOcrtjL0432csBtjMJEVW7HQtGF66y79E68BNR1sME1XnMOGX6pW1XusbcENpYH4ZPI3dsr2ILj_-fE6mJQ1eGTgz3ImZdY=w600-h315-p-k">
Which means a link to a photo album gets reduced to a single non-interactive photo. That's not an enhancement of the post contents.
@BenLubar I see, hotlinking disabled only on iframely.com, but works on open-sourced version. I've made some changes to template again https://github.com/NodeBB/nodebb-plugin-iframely/commit/239f52d2c9033c06c1032e5212f5c5f0f1d67ffc. Should be ok now?
:shipit:
Examples: