March 12, 2013 at 5:04 pm #25742
Hi, I’m using the Scribble theme. How do I change the preset image sizes for images that I’m inserting to a page or post? I tried changing in the Media Settings (changed Large from 1024 x … to 600 x 407) but that doesn’t change anything for the sizes available when inserting an image. The sizes stay the same as they were before changing Media Settings. What am I doing wrong?
Also, the sizes available when inserting an image (in the “insert media” window) seems to vary depending on the image selected. Why is that? I’d like to have 3-4 preset sizes that I know will fit nicely into my pages and be the same size throughout the site.
Hanna in Tahoe
If you’re not living on the edge, you’re taking up too much space.March 12, 2013 at 5:36 pm #25751
<code> // Add new featured image sizes
add_image_size( ‘home-top’, 400, 200, true ); </code>
In this example, add that line of code to your functions.php file…
Renaming “home-top” whatever you want to call your new image size “perfect-size” or something like that and then change the width (400) and height (200) to your new dimensions and leave or delete “true” based on whether you want it to hard crop or not.
Then when you go to add a new featured image, this new image dimension will be an option.
Additionally, after you’ve added that new size, if you go back and change your old featured images to the new featured image size, you can then use the plugin “Regenerate Thumbnails” to force your WP install to recreate the featured images at your new image size rather than the old ones.March 12, 2013 at 5:43 pm #25753
Hi, thanks for your response. Does it only pertain to Featured Images? If so, that’s not what I’m trying to do. I’m trying to get a preset size for inserting regular images into the content on a page or post.
However, I added this to my functions.php file, under Add new image sizes:
add_image_size( ‘large-photos’, 600, 407, TRUE );
Then I went into a page and tried inserting an image, the 600×407 size was not one of the options. Then I uploaded a new image, same there, no 600×407 size available.
What am I doing wrong?
If you’re not living on the edge, you’re taking up too much space.March 12, 2013 at 6:06 pm #25757
Yes and no – it creates the new image size, but it hadn’t yet added that new image size to the Media Gallery (I didn’t catch that you needed it there – I thought you needed it just in the featured image widgets, etc…).
So your simplest option may be http://wordpress.org/extend/plugins/simple-image-sizes/ .
But, if you want to finish coding it into the theme by hand, you can follow along here: http://wp.tutsplus.com/tutorials/theme-development/using-custom-image-sizes-in-your-theme-and-resizing-existing-images-to-the-new-sizes/ starting at Step 2 .
You must be logged in to reply to this topic.