Articles of images

Add an alignment option for images

A rare event – I want to do something in WordPress but have no idea how to go about it and searching turns up literally nothing. When you’re inserting an image into a post, you get alignment options: ‘none’, ‘left’, ‘right’, ‘center’. These result in the image being inserted with a CSS class related to […]

Uploaded images don't show in Media Library if there are special characters in IPTC Keywords

Some images that are uploaded to WordPress don’t show up in the Media Library. The images get uploaded and even cropped to the defined sizes, there is an entry in the Media Library, but the preview image doesn’t show. I can even use them as a featured image and they show up correctly on my […]

how to get original image using wp_get_attachment_image_src

I want to get the original image with the same width and height as uploaded. My original image is 630*370. Using the following function call I get a thumbnail sized at 630*198. wp_get_attachment_image_src($PriImgId,array(‘630′,’370’)); How can I get it at 630*370

removing inline styles from wp-caption div

Inline width and height attributes were never a huge problem with images in WordPress, since these were easily overwritten with CSS. The problem I’m having is that any images with captions are being wrapped in a ID ‘attachment_(‘attachmentnumber’) and a class of ‘wp-caption’ AND they’re given inline CSS width and height properties. This is a […]

What's the best way to use the Featured Image for responsive web design?

I have a brilliant idea and since WordPress already takes care of some of the work, I just need to find a good method to make this work. I am working on a project that needs to be responsive to all devices, whether a desktop PC or mobile gadget. Thus, I want the images to […]

Adding Category/Tag/Taxonomy Support to Images/Media

I’ve been trying to add category, tag, or custom taxonomy support to images (or all media, though I’m only concerned with Images). I’ve got it part-way figured out with: add_action(‘init’, ‘create_image_taxonomies’); function create_image_taxonomies() { $labels = array( ‘name’ => ‘Media Category’ ); $args = array( ‘labels’ => $labels, ‘public’ => true ); register_taxonomy(‘imagetype’, ‘attachment’, $args); […]

How To Delete Desired Image Sizes From wp-content/uploads?

My default media setting in WordPress blog is 150×150, 300×300, 1024×1024 respectively for thumbnail, medium, large images. Now I am designing a theme that need different size thumbnail images to show in theme. For this, I go to the media setting again and changed the setting with my news sizes like 72×72, 250×250, 400×400 respectively […]

Each custom image size in custom upload directory?

I want to upload my custom image sizes in custom folders. The folder should have the name of the selected width. For example: If I add these custom sizes… add_image_size(‘custom-1’, 300, 9999); add_image_size(‘custom-2′, 400, 9999); It would be nice the uploaded images are uploaded like this: http://www.my-site.com/wp-content/uploads/300/my-image.jpg http://www.my-site.com/wp-content/uploads/400/my-image.jpg Is this possible? I’ve only found that […]

How to change image type for specific size?

I am optimizing a site with large (dozens) quantity of images on page in a grid. For retina support the images are also need to be 2x sized. The low hanging fruit was to make sure the thumbnail sizes are loaded (which are still considerable 520px wide because of the retina) instead of full original […]

WordPress crop tool greyed out

The wordpress crop tool is greyed out for me in Firefox 3.6 (and IE7/8). I have disabled firefox add-ons and tried the solution here: WordPress Image Editor not working – conflict? But this hasn’t resolved the issue. Anyone know how wordpress determines whether to enable the crop button? WP version is 3.0.1 thanks,