Title: PHP Warning: getimagesize
Last modified: August 30, 2021

---

# PHP Warning: getimagesize

 *  Resolved [richieps](https://wordpress.org/support/users/richieps/)
 * (@richieps)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/)
 * Hi,
 * I’ve just noticed some errors showing up on cPanel Server Errors. They appear
   to relate to an image used for an Amazon Associate link.
 * Error message:
    `[STDERR] PHP Warning: getimagesize(//ws-na.amazon-adsystem.com/
   widgets/q?_encoding=UTF8&amp;ASIN=B00JHX5GVE&amp;Format=_SL250_&amp;ID=AsinImage&
   amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=rrexcelvbaprogcon-
   208&amp;language=en_US): failed to open stream: No such file or directory in /
   wp-content/plugins/litespeed-cache/src/media.cls.php on line 660`
 * Blog page with the image links:
    [https://richiesroom.com/excel-vba-programming-concepts/#Head6](https://richiesroom.com/excel-vba-programming-concepts/#Head6)
 * Any suggestions as to how to handle this would be greatly appreciated.
 * Thanks,
    Richie
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-getimagesize%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/#post-14820477)
 * Hi,
 * the thing here is that `getimagesize(//ws-na.amazon-` , the image start with `//
   xxx` may work with browser, but for `getimagesize()` it thinks it’s local absolute
   path , and try to locate it , but it doesn’t exist , so it throw out error
 * I don’t know where/how that image was added , but if you can edit, try make it
   begin with `http://` or `https://` in the URL
 * this error only makes `add missing size` not working on this image, everything
   else should be as it is
 * we shall add some better error handling in future version.
 * Best regards,
 *  Thread Starter [richieps](https://wordpress.org/support/users/richieps/)
 * (@richieps)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/#post-14820518)
 * Hi,
 * Thanks [@qtwrk](https://wordpress.org/support/users/qtwrk/) I’ll give that a 
   try.
 * Could this be the reason why, when the page loads, even though all of the content
   is loaded and visible, there is a spinning blue circle where the FavIcon is? (
   it only happens on this page – the only page with these image links)
 *  Thread Starter [richieps](https://wordpress.org/support/users/richieps/)
 * (@richieps)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/#post-14821094)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/) ,
 * I’m now getting this error:
    `in public_html/wp-content/plugins/litespeed-cache/
   src/media.cls.php on line 660`
 * Any idea what this means?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/#post-14821196)
 * it means in that file , line 660 , there is a function went wrong , which I have
   explained in above reply that `getimagesize()` thing
 *  [mtdas99](https://wordpress.org/support/users/mtdas99/)
 * (@mtdas99)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/#post-15093454)
 * I am also getting this error log:
 * PHP Warning: getimagesize([https://cbshop.in/wp-content/uploads/2021/09/reebok-logo-1.png](https://cbshop.in/wp-content/uploads/2021/09/reebok-logo-1.png)):
   failed to open stream: Redirection limit reached, aborting in /home/cbshop.in/
   public_html/wp-content/plugins/litespeed-cache/src/media.cls.php on line 660
 * Firstly I have disabled Add image size and then disabled all the media optimization
   settings in lightspeed plugin but still the notice showing in error log. Also
   the pages are loading too much slowly.
 * Some images are broken and some invalid urls like [http://3243](http://3243) 
   are inserted in place of image url. These are causing the error.
 * Please fix this as soon as possible or suggest any solution.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP Warning: getimagesize’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [mtdas99](https://wordpress.org/support/users/mtdas99/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-getimagesize/#post-15093454)
 * Status: resolved