Title: filesize(): stat failed
Last modified: May 2, 2018

---

# filesize(): stat failed

 *  Resolved [Mike Meinz](https://wordpress.org/support/users/mikemeinz/)
 * (@mikemeinz)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/filesize-stat-failed/)
 * I noticed that this message is logged when a post with an image is displayed.
   I have experienced this on Version 7.4 and 7.4.1. I do not know if it was occuring
   in prior versions.
 * [05/02/18 2:30pm UTC]
    filesize(): stat failed for C:\wamp\www\XXXXX.com/wp-content/
   uploads/C:\wamp\www\XXXXX.com/wp-content/uploads/2018/01/XXXXX-Logo-Transparent-
   Image.png in C:\wamp\www\XXXXX.com\wp-content\plugins\wordpress-seo\inc\class-
   wpseo-image-utils.php on line 219
 * **wp-content\plugins\wordpress-seo\inc\class-wpseo-image-utils.php**
 *     ```
       	public static function get_file_size( $image ) {
       		if ( isset( $image['filesize'] ) ) {
       			return $image['filesize'];
       		}
   
       		// If the file size for the file is over our limit, we're going to go for a smaller version.
       		// @todo save the filesize to the image metadata.
       		// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- If file size doesn't properly return, we'll not fail.
       		return @filesize( self::get_absolute_path( $image['path'] ) );
       	}
       ```
   
    -  This topic was modified 8 years, 3 months ago by [Mike Meinz](https://wordpress.org/support/users/mikemeinz/).

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

 *  Plugin Support [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * (@mikes41720)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/filesize-stat-failed/#post-10241471)
 * Could you please checkCan you try and gather as much information for us as possible?
   Please perform the following:
 * 1. Make sure the issue doesn’t persist when Yoast SEO is disabled.
    2. [Check for conflicts](https://kb.yoast.com/kb/how-to-check-for-plugin-conflicts).
   3. Check for [JavaScript errors with your console](https://kb.yoast.com/kb/how-to-find-javascript-errors-with-your-browsers-console).
 * If you find any JavaScript errors related to Yoast SEO or if there is a conflict
   with a plugin or a theme, or the issue still occurs, you can create a [new GitHub issue](https://github.com/Yoast/wordpress-seo/issues/new)
   for our developers. Please report the issue to a third party developer as well.
 *  [Md Mazedul Islam Khan](https://wordpress.org/support/users/mazedulislamkhan/)
 * (@mazedulislamkhan)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/filesize-stat-failed/#post-10263141)
 * Closed due to inactivity
 *  [Kristiyan Mitev](https://wordpress.org/support/users/komapeb/)
 * (@komapeb)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/filesize-stat-failed/#post-10300196)
 * Hey, I also encountered this error and I think there’s a bug in `class-wp-seo-
   image-utils.php`. Specifically the function `get_absolute_path`. I don’t have
   enough time right now to dig further into the problem, but it seems that the 
   function doesn not return the correct absolute path for a given path to an uploaded
   image.
 *  [lexinepishue](https://wordpress.org/support/users/lexinepishue/)
 * (@lexinepishue)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/filesize-stat-failed/#post-10857724)
 * I am also experiencing this error – is there a fix for this in the works?

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

The topic ‘filesize(): stat failed’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [filesize](https://wordpress.org/support/topic-tag/filesize/)

 * 4 replies
 * 5 participants
 * Last reply from: [lexinepishue](https://wordpress.org/support/users/lexinepishue/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/filesize-stat-failed/#post-10857724)
 * Status: resolved