• Hi there! Awesome plugin. I like the simplicity. Saved me a ton of time trying to come up with something custom. Greatly appreciated.

    I have everything configured but for some reason the images aren’t showing up. I checked opengraph.xyz and all is fine except the image. Upon visiting the image URL directly it downloads a 0 byte image. I tried in both Staging and Production. I tried on a CPT and also a standard WordPress Page. I cleared cache and saved Permalinks.

    In the error logs I see: “PHP Warning: imagejpeg() expects parameter 1 to be resource, bool given in /var/web/staging/public_html/wp-content/plugins/branded-social-images/lib/class.og-image-gd.php on line 333”

    I will keep investigating in the meantime and update this thread, but would love to know if you have a solution! Thanks.

    If relevant…
    Host: WPMUDEV
    PHP version: 7.4

    End of log:

    -- active plugins --
    1: ac-addon-acf/ac-addon-acf.php
    2: admin-columns-pro/admin-columns-pro.php
    3: advanced-custom-fields-pro/acf.php
    4: baho-setup/baho-setup.php
    5: branded-social-images/wp-plugin.php
    6: contact-form-7/wp-contact-form-7.php
    7: fathom-analytics/fathom-analytics.php
    8: flamingo/flamingo.php
    9: fluent-smtp/fluent-smtp.php
    10: kadence-blocks/kadence-blocks.php
    11: wp-defender/wp-defender.php
    12: wpmudev-updates/update-notifications.php
    -- php/wp functions --
    mime_content_type: exists
    finfo_open: exists
    wp_check_filetype: exists
    exec: does not exist
    shell_exec: does not exist
    passthru: does not exist
    system: does not exist
    -- php settings --
    memory_limit: 256M
    max_execution_time: 300
    -- end of log --
    • This topic was modified 2 years, 6 months ago by Keith Lock.
    • This topic was modified 2 years, 6 months ago by Keith Lock.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Keith Lock

    (@ksmgo)

    Also, phpinfo shows:

    GD Support	enabled
    GD headers Version	2.3.3
    GD library Version	2.3.3
    FreeType Support	enabled
    FreeType Linkage	with freetype
    GIF Read Support	enabled
    GIF Create Support	enabled
    JPEG Support	enabled
    PNG Support	enabled
    WBMP Support	enabled
    XPM Support	enabled
    XBM Support	enabled
    WebP Support	enabled
    BMP Support	enabled
    TGA Read Support	enabled
    Directive	Local Value	Master Value
    gd.jpeg_ignore_warning	1	1
    Thread Starter Keith Lock

    (@ksmgo)

    I got as far as learning that it is imagescale that is returning false ( hence the warning: “PHP Warning: imagejpeg() expects parameter 1 to be resource, bool given in /var/web/staging/public_html/wp-content/plugins/branded-social-images/lib/class.og-image-gd.php on line 333”

    Still digging.

    Thread Starter Keith Lock

    (@ksmgo)

    Seems support hasn’t been around in awhile. I ended up just editing the class.og-image-gd.php to get it to work. Not the best idea of course, but I wanted to move on with it.

    I changed:

    imagejpeg(imagescale($this->resource, $this->manager->width, $this->manager->height, IMG_BICUBIC_FIXED), $this->target, $quality);

    to:
    imagejpeg($this->resource, $this->target, $quality);

    …effectively bypassing imagescale and got things to work.

    I don’t know the issue, but I am settling with this workaround for now.

    Plugin Author Acato

    (@acato)

    @ksmgo

    It’s been a while.

    The company that created this plugin is no longer active, we’ve acquired the source and are trying to catch up.

    Thank you for your perseverance, I’ve tried to come up with a reason why imagescale would error-out, and the only thing I can imagine would be an unsupported image format, but, that would also mean the image should not work at all, which clearly is not the case.

    On Github you will find a version 2.0.0 branch that holds the next version of this plugin, in which I have added a few checks; if imagescale fails, imagecopyresized is used, and if that fails, the unscaled image is used. Inefficient, but it works.

    I hope you can try it out, but please be aware that large portions of the code have been rewritten, keeping backward compatibility in mind, but we cannot at this time guarantee it will work flawlessly.

    If you are willing to be a beta-tester, please find it here; https://github.com/acato-plugins/branded-social-images/tree/version-2.0.0`

    Hi.

    Wondering if you took a chance and tested the beta version. If so, what are your findings? If not, that’s o.k. too ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image 404’ is closed to new replies.