• Resolved tinywolves

    (@tinywolves)


    Hi, I am getting the message “could not retrieve file path” when listing unoptimised images for my site. Here is the debut info for one of the images:

    Array
    (
    [width] => 1920
    [height] => 1080
    [file] => 2014/12/winter-along-coastline-41.jpg
    [sizes] => Array
    (
    [thumbnail] => Array
    (
    [file] => winter-along-coastline-41-160×160.jpg
    [width] => 160
    [height] => 160
    [mime-type] => image/jpeg
    )
    [medium] => Array
    (
    [file] => winter-along-coastline-41-320×180.jpg
    [width] => 320
    [height] => 180
    [mime-type] => image/jpeg
    )
    [large] => Array
    (
    [file] => winter-along-coastline-41-1200×675.jpg
    [width] => 1200
    [height] => 675
    [mime-type] => image/jpeg
    )
    [grid] => Array
    (
    [file] => winter-along-coastline-41-540×304.jpg
    [width] => 540
    [height] => 304
    [mime-type] => image/jpeg
    )
    [grid_11] => Array
    (
    [file] => winter-along-coastline-41-540×540.jpg
    [width] => 540
    [height] => 540
    [mime-type] => image/jpeg
    )
    [grid_22] => Array
    (
    [file] => winter-along-coastline-41-1080×1080.jpg
    [width] => 1080
    [height] => 1080
    [mime-type] => image/jpeg
    )
    [grid_21] => Array
    (
    [file] => winter-along-coastline-41-1080×540.jpg
    [width] => 1080
    [height] => 540
    [mime-type] => image/jpeg
    )
    [grid_12] => Array
    (
    [file] => winter-along-coastline-41-540×1080.jpg
    [width] => 540
    [height] => 1080
    [mime-type] => image/jpeg
    )
    )
    [image_meta] => Array
    (
    [aperture] => 0
    [credit] =>
    [camera] =>
    [caption] =>
    [created_timestamp] => 0
    [copyright] =>
    [focal_length] => 0
    [iso] => 0
    [shutter_speed] => 0
    [title] =>
    [orientation] => 0
    )
    )

    any help would be greatly appreciated. Thanks.

    https://wordpress.org/plugins/ewww-image-optimizer/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    That means the file is not where WordPress is telling the plugin it is supposed to be. When that happens, it generally means that at some point the actual file was deleted using a file manager or cpanel or something, and the Media Library has an orphaned image attachment record.

    The other possibility is that you’ve offloaded your images to a CDN or something like Amazon S3, and the local copies don’t exist anymore. If you use something like WPEngine’s LargeFS, you would need to ask them to download your images from S3 to the local storage temporarily.

    Thread Starter tinywolves

    (@tinywolves)

    Hi Thanks for the quick reply, i’m not currently using a CDN or any cloud hosting, but have been using W3 Caching plugin – would that interfere at all? it’s basically saying that all my images are not where they are supposed to be, despite them showing up on the website.

    Thread Starter tinywolves

    (@tinywolves)

    if I look at the image details in WP Media Library, the path to the images seems to be correct. For Example, the image debug info posted above is situated at http://tinywolf.uk/temp/wp-content/uploads/2014/12/winter-along-coastline-41.jpg

    in Media Settings my upload folder is set to /public/wp-content/uploads

    Thread Starter tinywolves

    (@tinywolves)

    looked in my FTP and the upload location is /public_html/wp-content/uploads and the images are in the correct folders.

    Plugin Author nosilver4u

    (@nosilver4u)

    Turn on debugging, run the bulk optimize via the Unoptimized Images page, and then post the information that will be displayed beneath an image after it has been optimized (or attempted to optimize).

    Thread Starter tinywolves

    (@tinywolves)

    Hi, Thanks for the reply, here is the debug log:

    tinywolf
    EWWW IO version: 250.0
    WP version: 4.3
    PHP version: 50328
    ewww_image_optimizer_preinit()
    ewww_image_optimizer_gallery_support()
    ewww_image_optimizer_admin_init()
    ewww_image_optimizer_init()
    ewww_image_optimizer_cloud_init()
    ewww_image_optimizer_exec_init()
    ewww_image_optimizer_cron_setup()
    ewww_image_optimizer_cron_setup()
    ewww_image_optimizer_bulk_loop()
    ewww_image_optimizer_resize_from_meta_data()
    attachment id: 2195
    this image already has metadata, so it is not new
    ewww_image_optimizer_attachment_path()
    ewww_image_optimizer_remote_fetch()
    could not retrieve path
    ewww_image_optimizer_update_attachment_metadata()
    attachment id: 2195
    ewww_image_optimizer_attachment_path()
    could not retrieve path

    Plugin Author nosilver4u

    (@nosilver4u)

    That’s strange, I’m going to see if I can add in some additional debugging there, as ewww should at least be able to construct the filename via the old method using the metadata, but it isn’t…

    Thread Starter tinywolves

    (@tinywolves)

    This seems to be a problem with permissions: I am getting an error from wordpress whenever I try to upload new media.

    Unable to create directory uploads/2015/08. Is its parent directory writable by the server?

    Have contacted my hosting provider to try and resolve this.

    Thread Starter tinywolves

    (@tinywolves)

    Hi, This is solved, this was due to permissions int the MYSQL database and was sorted by my hosting provider. Thanks for all your help anyhow!

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

The topic ‘could not retrieve file path’ is closed to new replies.