voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

Incompatibility with AWS plugin? #54

Closed jordilondoner closed 8 years ago

jordilondoner commented 9 years ago

Hi, I am using this plugin for getting two images per post. I am also using the amazon web services plugin because I need my images on an S3 bucket. but when I am getting back the 'second featured image' the url points to the 'domain' url, it is not updated properly as it is the main featured image. This is what I am using to pull the image url: $secondary_thumb_id = MultiPostThumbnails::get_post_thumbnail_id('post', 'secondary-image' , $value->ID); Any way to change it?

chrisscott commented 9 years ago

I you are using that function you noted, that gets the thumbnail ID. To get the url you need to use MultiPostThumbnails ::get_post_thumbnail_url) That function uses the core functions wp_get_attachment_image_src() or wp_get_attachment_url() (depending on image size) so ideally it should work with any plugin.

jordilondoner commented 9 years ago

Hi, thanks for the quick answer. I think that I wasn't clear enough though. the issue is that the second image is stored in the DB with the 'default url' the one that points to my server instead of to the S3 bucket as it happens with the main featured image.

chrisscott commented 8 years ago

Closing due to age. Please re-open if needed.