Title: Figcaption Messes Up Image Width
Last modified: August 15, 2019

---

# Figcaption Messes Up Image Width

 *  Resolved [kenspear](https://wordpress.org/support/users/kenspear/)
 * (@kenspear)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/figcaption-messes-up-image-width/)
 * Dear gurus,
 * On my AMP pages, I have this issue where all images with a caption <figcaption
   > tend to have their dimension/width blown up larger than usual.
 * If you refer to the link provided, the two images without a caption are in the
   correct or appropriate width; the rest with a caption are in the full size beyond
   the width of the AMP content. May I know what causes this and how to fix it?
 * Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffigcaption-messes-up-image-width%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/figcaption-messes-up-image-width/#post-11834638)
 * [@kenspear](https://wordpress.org/support/users/kenspear/) In your non AMP website
   I can see a `style="width: 1048px"` in your figure tag. This is being carried
   across to your AMP version. There is also a class added to that figure tag in
   your AMP URLs with that fixed width defined.
 *     ```
       figure .amp-wp-4db48ca {
           width: 1048px;
       }
       ```
   
 * Are you using an image optimisation plugin which could be the cause?
 * A workaround is to set a parent `max-width` CSS rule for your AMP endpoints. 
   To ensure that impacts on your AMP URLs only add the following to your functions.
   php file in your active theme.
 *     ```
       add_action( 'amp_post_template_css', function() {
       	echo "figure { max-width: 100%; }";
       } );
       ```
   
 * Let me know if that works, and if you can find the plugin or cause of the issue.
 *  Thread Starter [kenspear](https://wordpress.org/support/users/kenspear/)
 * (@kenspear)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/figcaption-messes-up-image-width/#post-11835285)
 * [@jamesosborne](https://wordpress.org/support/users/jamesosborne/) the second
   method works like a charm! Thanks so much dude.
 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/figcaption-messes-up-image-width/#post-11835360)
 * [@kenspear](https://wordpress.org/support/users/kenspear/) No problem, feel free
   to leave the plugin a review. Out of curiosity Do you know what plugin was causing
   the problem, did you test disabling any of them before applying the fix?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Figcaption Messes Up Image Width’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [image size](https://wordpress.org/support/topic-tag/image-size/)

 * 3 replies
 * 2 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/figcaption-messes-up-image-width/#post-11835360)
 * Status: resolved