How can I tell WordPress to reset all posted image sizes to the largest set width?

I’ve set the width of large files in WordPress’ Media settings, but how can I tell WordPress to apply the setting to all the images I’ve already inserted in posts? It’s limiting them to a previous setting of 500px wide.

Wordpress thumbnail sizes

Related posts

Leave a Reply

2 comments

  1. I’d say to search and replace your wp_posts SQL row for width=”500″ to width=”920″ and import it back because WordPress hardcodes that stuff inside of your post’s content.

    You can also use jQuery (included with WordPress) to do it on the fly which would be easiest with:

    $(function(){
                $('.size-full').each(function(){
                    if($(this).attr('width') == '500'){
                        $(this).attr('width','920').removeAttr('height');
                    }
                });
            });
    

    I’d remove the height attribute so that it’s not distorted. For maximum browser compatibility add img {height:auto} to your CSS file after using the JS code.