Featured Image Thumbnail Creation

The image isn’t created on save, but rather on upload. The same process that creates the “thumbnail”, “medium”, and “large” size images also creates any other image sizes defined via add_image_size().

Stripping the_content() from images then displaying them seperately

maybe use this regex: $pattern = “/<a(.*?)href=(‘|\”)([^>]*)(‘|\”)(.*?)><img(.*?)src=(‘|\”)([^>]*).(bmp|gif|jpeg|jpg|png)(‘|\”)(.*?)class=(‘|\”)([^>]*)(‘|\”)(.*?)\/><\/a>/i”; function example_replace ($content) { global $post; $pattern = “/<a(.*?)href=(‘|\”)([^>]*)(‘|\”)(.*?)><img(.*?)src=(‘|\”)([^>]*).(bmp|gif|jpeg|jpg|png)(‘|\”)(.*?)class=(‘|\”)([^>]*)(‘|\”)(.*?)\/><\/a>/i”; $replacement=”<a$1href=$2$3$4$5><img$6src=$7$8.$9$10$11class=$12$13 <strong>imagelink</strong>$14$15$16/><\/a>”; $content = preg_replace($pattern, $replacement, $content); return $content; }

Gallery Image Numbers?

This should do it: global $post; $ancestors = get_post_ancestors($post->ID); $photos = get_children(array( ‘post_mime_type’ => ‘image’, ‘post_parent’ => array_shift($ancestors), )); $index = 0; foreach($photos as $photo){ $index++; if($photo->ID === $post->ID) break; } printf(‘%d out of %d’, $index, count($photos));

Set jpeg_quality for certain post-types

You can hook into the jpeg_quality filter and do a check for the post type you want to apply the filter to. add_filter( ‘jpeg_quality’, ‘my_jpeq_quality’ ); function my_jpeg_quality( $quality ) { if ((isset($_GET[‘post_type’]) && $_GET[‘post_type’] == ‘your_post_type’) || (isset($post_type) && $post_type == ‘your_post_type’)) : return 100; //Set quality here endif; }

Rotating image does not work for custom image sizes

From examination, it looks like a bug. I can’t think of a good reason it shouldn’t apply those changes. Reported: http://core.trac.wordpress.org/ticket/19889 Patch in that ticket fixes the problem. Also, in response to your other question, you can define IMAGE_EDIT_OVERWRITE to true in the wp-config file to make it not create those oddly named files and … Read more

Faster way to put images into a blog post by using Add Media dialog

Nothing here is a silver bullet, but here are some suggestions: If you find yourself using your library more than uploading new images, you can make the default tab “Library”: add_filter(‘_upload_iframe_src’, ‘change_default_media_tab’); function change_default_media_tab($uri) { return $uri.’&amp;tab=library’; } If you want the default tab to be the uploader, but you want it to load faster, … Read more