[wp-hackers] iOS WP app: Featured image size problems
simon.vart at exigences.biz
Wed Oct 23 14:57:35 UTC 2013
I think you could also add a new image size in functions.php :
add_image_size( '300px', 300, 300, true );
and then your call to wp_get_attachment_image_src() will be understood.
When you upload an image, WP will create a image of this size with the
développement web / informatique
linkedin : http://www.linkedin.com/profile/view?id=87258047
twitter : @simonvart
Le 23/10/2013 14:25, J.D. Grimes a écrit :
> I don't think that wp_get_attachment_image_src() accepts parameters of the format you are using ('300px'). http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src
> The $size can either be a keyword (thumbnail, medium, large or full) or an array (array(300,300)).
> On Oct 22, 2013, at 7:23 PM, Micky Hulse <mickyhulse.lists at gmail.com> wrote:
>> Details: Wordpress 3.6.1, iOS WP app 3.8.3.
>> I'm hoping someone can help me figure this one out. I can't seem to
>> find an answer on Google.
>> Create/publish post from the WP iOS app that has a featured image
>> (uploaded as "original" size).
>> Functions that get the post's thumbnail only return original size.
>> What I see:
>> When looking at FTP upload location, all of the image sizes (I've got
>> several custom sizes) are there.
>> When I run:
>> print_r(wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), '300px'));
>> ... I get:
>>  => http://foo.com/blog/files/2013/10/20131022-160759.jpg
>>  => 0
>>  => 0
>>  =>
>> I'm not sure how to trouble shoot this.
>> At first I thought that maybe the WP app did not obey the custom
>> images sizes ... But they are generated and sitting there in my
>> uploads folder.
>> It's almost like something, image related, isn't getting logged to the
>> database when the WP app makes a post.
>> I'd love some help. I'm hoping it's something I overlooked and is easy
>> to fix. :)
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers