WPIntell

Source evidence

PHP warnings when processing 404 images in post content

Schema & Structured Data for WP & AMP · support · 2026-01-22T00:32:00+00:00

mixedsentiment
highseverity
0.95relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 34 rows with source links

14.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
tnoguchi resolved
We encountered PHP warnings when the plugin processes missing/404 images embedded in post content: PHP Warning: file_get_contents( https://example.com/images/missing.jpg ): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found PHP Warning: exif_imagetype( https://example.com/wp-content/uploads/missing.gif ): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found Issue: The saswp_get_image_details() function attempts to validate all images in content, including external or broken URLs, causing error log spam. Workaround: We added a filter to only process images from our uploads directory: add_filter('saswp_get_image_details', function($img_details, $url) { if ($img_details !== false) return $img_details; if (!filter_var($url, FILTER_VALIDATE_URL)) return false; $uploads_url = wp_upload_dir()['baseurl']; $uploads_normalized = preg_replace('#^https?://#', '', $uploads_url); $url_normalized = preg_replace('#^https?://#', '', $url); return (strpos($url_normalized, $uploads_normalized) === 0) ? false : []; }, 10, 2); Suggestion: Consider adding URL validation before calling file_get_contents() or gracefully handling 404 responses to prevent warnings on missing images. Thanks! Hi, Thank you for sharing this. We have raised a GitHub ticket regarding this concern and it will be addressed in an upcoming update. We kindly request your patience in the meantime. Here is the GitHub Ticket. Hi, Hope you are doing well. We have released version 1.56 , in which this concern has been addressed. Kindly update the plugin to the latest version, clear the cache, and give it a try.

Comments

2 shown
Akshay A 2026-01-22T05:51:00+00:00

Hi, Thank you for sharing this. We have raised a GitHub ticket regarding this concern and it will be addressed in an upcoming update. We kindly request your patience in the meantime. Here is the GitHub Ticket.

Akshay A 2026-03-06T07:24:00+00:00

Hi, Hope you are doing well. We have released version 1.56 , in which this concern has been addressed. Kindly update the plugin to the latest version, clear the cache, and give it a try.