views:

63

answers:

2

I've set the width of large files in Wordpress' Media settings: http://cl.ly/7wX 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.

Thanks!

A: 

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.

Oscar Godson
A: 

There is a plugin for resizing all your thumbnails. I think it is called the Rebuild Thumbnails plugin, or something similar

Doug
Doug—I just found that plugin yesterday actually! I should have checked back in sooner. Thanks!
robalan