You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e. it scales the image using HTML width/height attributes (my base image had a 4:3 aspect) and picks the closest already available size (1024x768 in my case).
Obviously, scaling in the browser should be avoided if possible, for better bandwidth efficiency and rendering speed.
and changing the array( 700, 700 ) to "independent_publisher_post_thumbnail" in the content-single.php line mentioned above. The code generated by wordpress now reads (after uploading a new image)
@henryk This has been fixed in the development branch and will go out with the next release. Thanks so much for your detailed report. The way you explained things saved me a lot of work! :)
Moin,
Currently
independent-publisher/content-single.php
Line 10 in 27319cf
array( 700, 700 )
. This leads to wordpress doing something rather silly:i.e. it scales the image using HTML width/height attributes (my base image had a 4:3 aspect) and picks the closest already available size (1024x768 in my case).
Obviously, scaling in the browser should be avoided if possible, for better bandwidth efficiency and rendering speed.
http://codex.wordpress.org/Post_Thumbnails recommends to use a string instead of the size array as the first argument to
the_post_thumbnail
, which means a prescaled image might already be available. There's two options: Use the predefinedpost-thumbnail
size by changing it to 700x700 with http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size or define a new image size with http://codex.wordpress.org/Function_Reference/add_image_size.I've successfully tested the latter variant by adding
below
independent-publisher/functions.php
Line 76 in 27319cf
and changing the
array( 700, 700 )
to"independent_publisher_post_thumbnail"
in the content-single.php line mentioned above. The code generated by wordpress now reads (after uploading a new image)Henryk Plötz
Grüße aus Berlin
The text was updated successfully, but these errors were encountered: