I'm working on WordPress site where it's important to have images sit on a baseline grid of 18px, where total image dimensions are always multiples of 18px, with the height cropped by an extra 8px. This is mostly a layout thing and to have images play nicely with text.
I am trying to figure out how to hook into WP/GD functionality where:
- Image is resized as normal (thumbnail, medium, large), setting max width only in WP admin.
- The image height is (math, round?) cropped to the closest multiple value of X (in this case 18px).
- Using the new height, crop again by subtracting another X value of the height (in this case 8px).
The end result would ideally be a plugin where values can be activated and edited开发者_开发知识库 for individual users in a multi-site environment.
i'm seeking the same behavior for a website. I found several plugins http://wordpress.org/extend/plugins/resize-at-upload/ or http://wordpress.org/extend/plugins/resize-on-upload/ which show that we can add an action to "wp_handle_upload".
I dig this way !
精彩评论