Articles of images

Wrap all post images inside a div element

I searched for all kind of solution but i really could find one that did what i was looking for, what i simple want done is wrapping all images inside a div element, old post aswell as new posts. All help is very much appreciated p.s. I did a little jquery snippet but I really […]

Link to File URL by default

Every time I insert an image into my post, the default link is to the image attachment page. How can I change it so it always links to the File address?

Displaying a featured image (only img url) as the img src?

I have the following code: if (themedy_get_option(‘product_gallery’)) { add_action(‘genesis_post_content’, ‘themedy_product_images’, 1); } function themedy_product_images() { ?> <?php global $post; $images = get_children( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘numberposts’ => 999, ‘order’=> ‘ASC’, ‘orderby’ => ‘menu_order’ ) ); if ( $images ) { ?> <div class=”twocol-one”> <?php echo get_the_post_thumbnail( $post->ID, ‘product-400×600’ […]

How to get an image transferred via FTP or script to appear in Media Manager?

I’ve got a plugin that transfers some files over to the uploads folder of the site in which the plugin is installed. It works fine, however, the images are not appearing in the Media Manager. I expect some database registration is involved. Given the script below which copies the files into the directory, what command […]

Hook to get image filename when it is uploaded

I want to get the full local filename of an uploaded image so that I can copy it to a new directory and process it with my own image processing scripts. Which hooks/actions should I look into to achieve this? Thanks

How to remove link from an image in a post?

When image is being added in a post it is being wrapped with a <a href></a> I want to know which class controls this segment and where I can find a decent doc for this kind of problems because wp docs sucks when it comes to development and I just started working with WordPress and […]

copy attachment title to description and alt text

I have a blog with a lot (over 1000) images. Each image has a meaningful descriptive filename. WordPress has title caption and description fields for images. What’s the easiest way to batch process all images and copy the file name to the title alt description and caption fields. Also if I could update yoast seo […]

Why won't these imported images show up?

I recently imported posts from another WP install, and everything seemed to go smoothly – except in specific cases where images are placed into a Post with the dimensions in the url. For example…we have a full-size image on the server called “lindsay-wedding.jpg”. The imported post, however, uses “lindsay-wedding-300×255.jpg” (which doesn’t exist on the server). […]

Unattaching images from a post

I currently have a custom post type in a theme I’m developing which will be used for portfolio items. So far, I have implemented functionality that allows images to be attached to a portfolio post. I now need the best way to go about detaching images from a post: My code currently is: $images =& […]

Bulk Image Uploader to create new post from each image

Is there any plugin which creates a new post from each image I upload/select with it? I want to create many posts with one image per post. Currently I select, upload all images. Then create new post, name it same as image file name, insert image from media library and then save to draft/publish it