No Runny Eggs

The repository of one hard-boiled egg from the south suburbs of Milwaukee, Wisconsin (and the occassional guest-blogger). The ramblings within may or may not offend, shock and awe you, but they are what I (or my guest-bloggers) think.

Effective cropping of pics in WP 2.5

by @ 19:00 on April 10, 2008. Filed under The Blog.

No, I don’t have WP 2.5 on here yet (a couple different reasons), but I decided to see if I could help out Stephen Green with some image usage issues he has with WP 2.5. His first issue, having a thumbnail going to a holding page instead of a full-sized pic, was pretty easy to solve. To avoid that, one should use the “File URL” as the link instead of “Page URL”.

The other item is a bit uglier; the cropping of a pic to the column width. I didn’t mention it here, but the “full-sized” option is anything but; while it does load the full-sized pic, it crops it to a maximum of 500 px by 500 px, and I don’t see a way to automatically change that (one could get rid of the height and width attributes in the HTML, but a lot of people use the visual editor).

Fortunately, there is a third option (besides the misnamed “full-sized” and thumbnail) to size a picture in WordPress, “medium”. With a bit of tweaking, one can change that from its default maximum 300 px by 300 px to fill the post column. With the caveat that this only works with pictures uploaded after you make the change, here’s how to make it happen:

– Find out how wide your post column is.
– Under Options > Miscellaneous, find the “Medium size” box in the “Image sizes” section.
– Put in that width for “Max width”, and at least 4/3rds that for “Max height”. Why 4/3rds? That allows vertical pictures to be the full width of the column. As an example, if the post column is 600 pixels wide, put “600” in for “Max width” and “800” for “Max height”.
– Hit “Save Changes”.
– Use “Medium” for the picture size. If the original picture is at least as wide as the column, it will be cropped to the width of the column.

Comments are closed.

[No Runny Eggs is proudly powered by WordPress.]