• Resolved Travelographer

    (@travelographer)


    Hey!

    Thank you for your awesome plugin.

    Since I updated wordpress to version 4.4 a bug occures in upPrev.
    Instead of the specified width of the thumbnail it just chooses something different.

    In my opion it is caused by the new responsive features of wordpress.

    And I guess you have to fix this part of code, but unfortunately I don’t know how :/

    get_the_post_thumbnail(
                                get_the_ID(),
                                array(
                                    $iworks_upprev_options->get_option( 'thumb_width' ),
                                    9999
                                ),

    https://wordpress.org/plugins/upprev/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marcin Pietrzak

    (@iworks)

    Dear Travelographer

    I try to check this.

    Marcin

    Thread Starter Travelographer

    (@travelographer)

    Hey Marcin,

    thanks for your quick reply.

    As a workaround I replaced the array with one of the wordpress standard dimensions.

    Regards
    Christian

    Plugin Author Marcin Pietrzak

    (@iworks)

    Dear Travelographer

    I can not confirm your request. Please add your page address – I try to check this.

    Look at http://upprev.com/ – all is ok.

    Cheers,
    Marcin

    Thread Starter Travelographer

    (@travelographer)

    Hey Marcin,

    thank you for your response.

    One of my blogposts as an example:
    http://www.travelography.de/2015/12/10/island-tipps-route-fotografie/

    I have already fixed it on my blog, but I guess there are a lot of other people, who still have this issue.

    To explain the issue I may have to go in greater detail.

    The issue is just related to the dimension of the thumbnail images. Btw I couldn’t find any thumbnail images on you mentioned website?!

    I configured my upPrev plugin that it should show the thumbnail of the previous post with a width of 300px.

    Up to the wordpress 4.4 it worked fine. Since the update wordpress has a so called srcset (sourceset) feature to better support responsiveness.

    Unfortunately it choose the wrong dimension from the sourceset. So there is a 578px width thumbnail displayed instead of the 300px width thumbnail. It is just resized to fit in the div.

    But that’s an issue regarding to pagespeed and traffic volume of the website. Also it might have influence on your SEO.

    As a workaround I changed the following code snippet:

    apply_filters(
                            'iworks_upprev_get_the_post_thumbnail', get_the_post_thumbnail(
                                get_the_ID(),
                                array(
                                    $iworks_upprev_options->get_option( 'thumb_width' ),
                                    9999
                                ),
                                array(
                                    'title'=>get_the_title(),
                                    'class'=>'iworks_upprev_thumb'
                                )
                            )

    to

    apply_filters(
                            'iworks_upprev_get_the_post_thumbnail', get_the_post_thumbnail(
                                get_the_ID(),
                                'featured_small',
                                array(
                                    'title'=>get_the_title(),
                                    'class'=>'iworks_upprev_thumb'
                                )
                            )

    and added to my functions.php

    add_image_size( 'featured_small', 300, 300, false);

    As I mentioned it’s just a workaround. Because I lost all the flexibility I had..

    Hope you can better understand my issue now 🙂

    Regards
    Christian

    Plugin Author Marcin Pietrzak

    (@iworks)

    Dear Travelographer

    I try to figure how use new feature with responsible images.

    Marcin

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Wrong dimension of thumbnail since wordpress 4.4’ is closed to new replies.