wp embed fetch <url>

Attempts to convert a URL into embed HTML

Arguments

NameDescription
urlURL to retrieve oEmbed data for

Options

NameDescription
--width <width>Width of the embed in pixels
--height <height>Height of the embed in pixels
--post-id <id>Cache oEmbed response for a given post
--discoverEnable oEmbed discovery. Defaults to true
--skip-cacheIgnore already cached oEmbed responses. Has no effect if using the ‘raw’ option, which doesn’t use the cache
--skip-sanitizationRemove the filter that WordPress from 4.4 onwards uses to sanitize oEmbed responses. Has no effect if using the ‘raw’ option, which by-passes sanitization
--do-shortcodeIf the URL is handled by a registered embed handler and returns a shortcode, do shortcode and return result. Has no effect if using the ‘raw’ option, which by-passes handlers
--limit-response-size <size>Limit the size of the resulting HTML when using discovery. Default 150 KB (the standard WordPress limit). Not compatible with ‘no-discover’
--rawReturn the raw oEmbed response instead of the resulting HTML. Ignores the cache and does not sanitize responses or use registered embed handlers
--raw-format <json|xml>The serialization format for the value