Forums
Forums / Themes and Templates / Auto Resize Embed Objects
(@futurepocket)
15 years, 1 month ago
I was wondering if there was a way to define max width/height for objects embedded into single post pages?
Also, is there a way to define a function to automatically resize all embedded objects (mostly videos) to a certain width/height?
Thanks!
(@chipbennett)
If you’re embedding video, then you need to set the $content_width variable in functions.php:
if ( ! isset( $content_width ) ) { $content_width = YYY; }
(where “YYY” is the width, in pixels, of the content area)
Note that attached images that are inserted as the standard “large” size will also respect $content_width.
The topic ‘Auto Resize Embed Objects’ is closed to new replies.