Title: Auto Resize Embed Objects
Last modified: August 19, 2016

---

# Auto Resize Embed Objects

 *  [futurepocket](https://wordpress.org/support/users/futurepocket/)
 * (@futurepocket)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/auto-resize-embed-objects/)
 * 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!

Viewing 1 replies (of 1 total)

 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/auto-resize-embed-objects/#post-2000471)
 * 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.

Viewing 1 replies (of 1 total)

The topic ‘Auto Resize Embed Objects’ is closed to new replies.

## Tags

 * [auto](https://wordpress.org/support/topic-tag/auto/)
 * [embed](https://wordpress.org/support/topic-tag/embed/)
 * [resize](https://wordpress.org/support/topic-tag/resize/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/auto-resize-embed-objects/#post-2000471)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
