
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
getty-embeddy
Advanced tools
Embed Gettyimages photos (iFrame) into your website using Gettyimages's native oEmbed endpoint.
the concept was as lightweight and direct as possible for smaller footprint so if you want a power horse with > 500 LOC check something like embedza, url-embed or jquery-oembed-all. However, make sure they support Gettyimages!
Feedback and PRs are welcomed.
well, you can't -.-
unlike other social services out there, GettyImages kinda forces you to use oEmbed (or their API) to get the working iframe link.
However, if you managed to generate the url on the fly, please tell me!
$ npm install --save getty-embeddy
var GettyEmbeddy = require('getty-embeddy');
// all options are optional with the default values shown here:
var gettyEmbeddy = new GettyEmbeddy({
// undefined to search in whole document or an element to use as parent for better performance (recommended!)
parentEl: undefined,
// all elements with this class will be processed
selectorClass: 'js-getty-embeddy-el',
// which data attr will hold the GettyImages image id
dataAttr: 'getty-embeddy-id',
//provide the src (link) attribute for the loading image or false to disable
//any valid src is accepted (url,base64,svg...)
loaderImgSrc: 'data:image/gif;base64,R0lGOD....[a small gif loader encoded in base64]',
// a function to run if embedding fails (image was removed or invalid id etc...)
// el is the affected element and reason is a string, one of 'no_image_id','invalid_response','connection_error'
onLoadFail: function (el, reason) {
if (el && reason && this.options.defaultOnFailHtml && this.options.defaultOnFailHtml.replace) {
el.innerHTML = this.options.defaultOnFailHtml.replace('__REASON__', reason);
}
console.warn('GettyEmbeddy - onLoadFail was called reason:', reason, ' element:', el);
},
// if you don't want to provide different onFail function, you can simply change the html here
// '__REASON__' will be replaced with the fail reason if found
defaultOnFailHtml: '<span>embedding failed reason:__REASON__</span>',
// the css to use for the loader element
loaderCss: 'margin:auto;display:block;top:50%;position:relative;',
// the time (in milliseconds) to delay the embedAll process for better performance, set to 0 to disable
embedDelayDuration: 100,
});
gettyEmbeddy.embedAll(); // will scan parentEl for possible embeds and load them (with the 'embedDelayDuration' delay between each embed)
gettyEmbeddy.embed(el); //will check el's data attributes for dataAttr to get image id
gettyEmbeddy.embed(el, '604533586'); // you can provide the id directly if the element doesn't have one or if you need to override it
// gettyEmbeddy.getHtml(gettyId); //TODO
FAQs
Embed Gettyimages photos (iFrame) using Oembed.
We found that getty-embeddy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.