Title: Featured Image error
Last modified: August 31, 2016

---

# Featured Image error

 *  Resolved [zagur](https://wordpress.org/support/users/zagur/)
 * (@zagur)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/featured-image-error-6/)
 * I just installed the pluguin in WordPress 4.5.2 and have setup
 * **Options:**
    “_Copy featured image When duplicating?_” – checked “_Copy destination
   post content images to media library?_” Unchecked
 * Content images are displayed correctly, but not featured images. Do I have to
   configure something else? Actually copy the featured images on folder but can
   not be displayed (0 bytes).
 * Thank you for your attention to this matter.
 * [https://wordpress.org/plugins/multisite-post-duplicator/](https://wordpress.org/plugins/multisite-post-duplicator/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Benjamin Pongy AXOME](https://wordpress.org/support/users/redpik/)
 * (@redpik)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/featured-image-error-6/#post-7399262)
 * the same bug for me!
    thanx for your help.
 *  [joedev91](https://wordpress.org/support/users/joedev91/)
 * (@joedev91)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/featured-image-error-6/#post-8185626)
 * Same bug here.. And isn’t working for the post attachments too.
 * I debuged this issue and I found something, in **mpd-functions.php** method **
   mpd_get_featured_image_from_source** full URL is spected ([http://mypage/wp-content/content&#8230](http://mypage/wp-content/content&#8230);)
   but **wp_get_attachment_image_src** method return this kind of url /wp-content/
   content…
 * I modified this method to this and now it’s working on my site
 *     ```
       /**
        * Gets information on the featured image attached to a post
        *
        * This function will get the meta data and other information on the posts featured image; including the url
        * to the full size version of the image.
        *
        * @since 0.5
        * @param int $post_id The ID of the post that the featured image is attached to.
        * @return array
        *
        * Example
        *
        *          id => '23',
        *          url => 'http://www.example.com/image/image.jpg',
        *          alt => 'Image Alt Tag',
        *          description => 'Probably a big string of text here',
        *          caption => 'A nice caption for the image hopefully'
        *
        */
       function mpd_get_featured_image_from_source($post_id){
   
           $thumbnail_id   = get_post_thumbnail_id($post_id);
           $image          = wp_get_attachment_image_src($thumbnail_id, 'full');
   
           if($image){
   
               $image_details = array(
   
                   'url'           => get_attached_file($thumbnail_id),
                   'alt'           => get_post_meta( $thumbnail_id, '_wp_attachment_image_alt', true ),
                   'post_title'    => get_post_field('post_title', $thumbnail_id),
                   'description'   => get_post_field('post_content', $thumbnail_id),
                   'caption'       => get_post_field('post_excerpt', $thumbnail_id),
                   'post_name'     => get_post_field('post_name', $thumbnail_id)
   
               );
   
               $image_details = apply_filters( 'mpd_featured_image', $image_details );
   
               return $image_details;
   
           }
   
       }
       ```
   
    -  This reply was modified 9 years, 8 months ago by [joedev91](https://wordpress.org/support/users/joedev91/).
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/featured-image-error-6/#post-8197328)
 * hey joedev91. Thanks for looking into that. I’ll include your improvement in 
   a future update! Thanks!
    -  This reply was modified 9 years, 8 months ago by [MagicStick](https://wordpress.org/support/users/magicstick/).
 *  [joedev91](https://wordpress.org/support/users/joedev91/)
 * (@joedev91)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/featured-image-error-6/#post-8198401)
 * No problem! 🙂
 *  [prumievittar](https://wordpress.org/support/users/prumievittar/)
 * (@prumievittar)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/featured-image-error-6/#post-8198624)
 * It works for me, THX!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Featured Image error’ is closed to new replies.

 * ![](https://ps.w.org/multisite-post-duplicator/assets/icon-128x128.png?rev=1562920)
 * [Multisite Post Duplicator](https://wordpress.org/plugins/multisite-post-duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-post-duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-post-duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-post-duplicator/reviews/)

## Tags

 * [featured images](https://wordpress.org/support/topic-tag/featured-images/)

 * 5 replies
 * 5 participants
 * Last reply from: [prumievittar](https://wordpress.org/support/users/prumievittar/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/featured-image-error-6/#post-8198624)
 * Status: resolved