Articles of images

Scrape a webpage for image and add it to post

I was wondering if there was a way to scrape an external webpage for its first/best image and add it to a new post in WordPress. This seems like it would not be too complicated, but I can’t seem to find any existing plugins that do anything like to this. I know there are plugins […]

How to get all inline images in post content?

This question already has an answer here: Extract image src from a post and send it to an external form 2 answers

HowTo: develop WP template with dynamic background image

Is there a way to develop a WP template which, amongst others, sets the background image of a certain element dynamically by choice from admin backend? Think of an page editor who simply picks an image just like a regular piece of content. But instead of including the image via HTML <img> tag in the […]

Prevent WP from wrapping html in caption shortcode after 'image_send_editor' filter is applied

In my functions.php I have cooked up some functions to filter the attachment output code, when an attachment is sent to the editor. function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) { $arr = get_attachments_and_widths_arr($id); return attachments_and_widths_to_html($arr, $id, $align, $caption, $alt); } add_filter(‘image_send_to_editor’, ‘filter_image_send_to_editor’, 10, 9); The return statement returns a string that contains […]

Generating a certain sized thumbnail on the fly?

I’m displaying a picture under each post on my homepage using the following PHP code: <div class=”preview”> <a href=”<?php the_permalink(); ?>” rel=”bookmark” style=”background-image: url(‘<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID), array( 300,300 ), false, ” ); ?>’);”></a> </div> And the following CSS to make it appear at a certain size: .preview a { background-position: 0 50%; background-size: cover; […]

Show more than 200 images in one post

I have gallery post and its have more than 200 pictures in single post. So, when i open this post, Its take more than 2 min to open page, and the images not open fast. What can do ?

Visual Composer creating own shortcodes with vc_map() to return simple Image

I am using the Plugin Visual Composer with in a new Theme I develop. My question is about mapping shortcodes to Visual Composer arrays. The problem I get, when I try to make a custom element for an image. So here is what I did: I created an php file vc_shortcodes.php for my arrays of […]

Prevent images on self-hosted WordPress from being served from

I have created a few posts with featured images on my blog. Since this is self-hosted installation, I was more than sure, that all my files were upload to my server / hosting. But to my extreme surprise, when checking source I have found, that they’re served from (example code: <img src=””>) instead of […]

Whats causing image quality to be degraded?

I’m currently developing a site – – and I’ve been struggling to figure out why image quality is deteriorating in the “product grid” layout (below Newest/Popular/Price/Categories). The original image size when I upload is 460px by 300px. The images in the product grid are set to a proportional size – 394px by 257px, so […]

How do I get a post author's image/avatar via RSS from another blog?

I have 2 websites: one is a company website, the other is a blog for the company – these sites are on separate domains. On the homepage of the company website, there’s a square tile featuring the latest post from the blog, including the blog title (hyperlinked) and the post author’s picture/avatar. To retrieve the […]