• There’s been a couple of threads about performance issues due to getimagesize causing timeouts and high server usage.

    Looking at the getImage function under blog2social/includes/Meta.php that retrieves the imagesize for the og:image tag it downloads the local image with an HTTP request, which adds 100ms or so to the load time and potentially causes bottlenecks/timeouts if a lot of requests are made at a time.

    I can see further up in that function there is code to retrieve the image dimensions of the featured image stored in postmeta which would be more efficient, and means the HTTP request to the image wouldn’t be required.

    However that code only runs if the following is false:
    if (isset($this->metaData[$type . ‘_image’]) && !empty($this->metaData[$type . ‘_image’])) {

    On a default install with a featured image added to a post this returns true so the dimensions aren’t retrieved via the database.

    Could you please look into this to prevent the extra HTTP request in the background and the affect on performance?

Viewing 1 replies (of 1 total)
  • Plugin Support Blog2Social-Support

    (@blog2socialsupport)

    Hello Antony,

    Thank you for reaching out.

    We will gladly check and add your suggestion to our feature list for future developments. If this can be implemented in a future update, we will contact you.

    Please let us know if you have any other questions in the meantime.

Viewing 1 replies (of 1 total)
  • The topic ‘getimagesize bug’ is closed to new replies.