• Resolved uk03

    (@uk03)


    Hello,
    I came across an issue: Whatsapp and Signal also use the OG Data to select a preview image. But the default image size ‘full’ is too big, so no image is shown. Changing the size to ‘large’ fixes the issue since it serves a smaller image.

    I am not sure if ‘full’ is really useful in the og data anyway – but it would be helpful to at least make the size configurable somewhere ??

    My current solution is to run sed after each upgrade (which is managable but slightly inconenient)

    sed -i -e "s;'full';'large';g" class-iworks-opengraph.php

    Greetings, Ulrich

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

    (@iworks)

    hi @uk03

    Nice catch.

    Please update. Version 3.2.1 have new filter og_image_size – it allows to changing size. String or array ??

    Thank you!

    Suggested mu-plugin:

    <?php
    add_filter( 'og_image_size', function( $size ) {
        return 'large';
    });

    Marcin

    Plugin Author Marcin Pietrzak

    (@iworks)

    Thread Starter uk03

    (@uk03)

    Hi,

    Wow, this was fast.

    But somehow i might be to dumb to use it properly. Where should I define the filter.

    (inside the themes function.php somehow does not work?)

    Thread Starter uk03

    (@uk03)

    Ok, figured it out myself.

    For reference if someone else needs it:
    put it in a php-file in wp-content/mu-plugins
    then it gets loaded before the plugin.

    Plugin Author Marcin Pietrzak

    (@iworks)

    @uk03

    You are right!

    Marcin

    Hello, I also have this problem on OG — Better Share on Social Media, as Yoast SEo does not properly handle opengraph. I installed OG and when I noticed this problem with the image size, I uninstalled it and stayed with Yoast. However, the problem did not go away. In facebook debug, the image appears in the correct size when sharing a link, but in instagram messenger it does not. How could I fix this?

    Plugin Author Marcin Pietrzak

    (@iworks)

    hi @mhb

    Please create another ticket. This one is resolved.

    I uninstalled it and stayed with Yoast.

    How can I help if you are using yoast?

    M

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Make image Size configurable’ is closed to new replies.