How to Increase the Maximum Width of Uploaded Images in WordPress. By default, WordPress limits the maximum width of uploaded images (especially when inserted using the "Full Size" option in the editor). Historically, this default width was set to around 500px in earlier versions like WordPress 2.5 — which made sense for narrow post layouts.
However, many modern themes use wider content areas (e.g. 700–1200px wide), and you may want your full-size images to take full advantage of that space. In this tutorial, we’ll show you how to increase the maximum display width of uploaded images in WordPress by setting the global $content_width
value.
Why Change the Maximum Image Width?
- Prevent full-size images from being unnecessarily scaled down
- Ensure high-resolution photos display properly in wide content areas
- Improve visual impact, especially for portfolios, blogs, and tutorials
How to Set the Maximum Width for Uploaded Images in WordPress
- Log in to your WordPress Admin dashboard.
- Navigate to:
Appearance → Theme File Editor
(You may need to confirm a warning message to proceed.) - From the list of files on the right, select:
functions.php
(Theme Functions) - Find the opening PHP tag near the top:
<?php
Directly below it, add this line (adjusting the number as needed):
$GLOBALS['content_width'] = 800;
Replace
800
with the desired maximum pixel width (e.g., 1024). - Click Update File to save your changes.
What Happens Next?
From now on, when you insert a new image into your post using the Full Size option, WordPress will respect the new content_width
limit instead of defaulting to a smaller width.
This ensures your images are properly sized for your layout and look sharp on modern screens — especially when using responsive or full-width themes.
Bonus Tips
- Use Retina Images: Consider uploading images at double the display width (e.g., 1600px for a 800px container) to improve clarity on Retina/HiDPI screens.
- Regenerate Thumbnails: After changing image dimensions, use a plugin like Regenerate Thumbnails to apply the changes to previously uploaded media.
- Use Lazy Loading: WordPress enables lazy loading by default, but double-check that your theme supports it to help page speed.
That’s It!
Your site is now configured to support larger full-size images in posts — perfect for photo-heavy blogs, case studies, or tutorials. Enjoy better visual presentation and make the most of your theme’s layout space!