Articles of images

Set a background color per image added to a post

When using a modal window such as lightbox or shadowbox to display a post’s images, client would like to be able to choose the background color that would be used for the modal window according to the image to be shown: color would be either black, white or grey. I’m thinking such hack should be […]

How do I add a featured image to a single post page?

I’m using the Pinboard theme on WordPress 3.9.1. I’d like to edit Pinboard (or, more accurately, make a child theme) so that on single post pages, if the post has a defined featured image, it displays at the top of the post. I’ve gathered that doing so requires editing single.php in the theme, but my […]

How to set the default embed image size

When a user adds media to the WYSIWYG, is there a way to set the default image size to large? It defaults to medium, I’d like this to be “large” without the user having to change the value.

Automatically wrap post image in div

In regards to image attachments inserted into a post, I would like to wrap the img tag inside a div tag for specific design purpose. Is there a way to do this automatically after attaching the image file, like through hooks/filters maybe? Thanks in advanced!!

How to copy/paste web content with photos into my blog

I use my wordpress blog for research… When I write about something, the firs thing I do is research of what’s already out there on given topic. What I want to do is to be able to copy paste parts of the web pages for reference… If the page is only text… that’s grand. But […]

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