WordPress.org

Ready to get started?Download WordPress

Forums

Regenerate Thumbnails
Error Message - due to incorrect pathname (4 posts)

  1. DoctorDR
    Member
    Posted 2 years ago #

    Hi Alex, I am experiencing a showstopper that seems so obvious, but is leaving me stumped. Regen Thumbnails is failing on all images seemingly due to it using the wrong path.

    Here’s one of the error log messages;

    “Aston Martin DBS Touchtronic” (ID 28110) failed to resize. The error message was: The originally uploaded image file cannot be found at /home/public_html/mywebsite.com/public/htdocs/uploads/http://www.mywebsite.com/wp-content/uploads/2010/05/DBS-touchtronic_banner.jpg

    The image exists at ‘http://www.mywebsite.com/wp-content/uploads/2010/05/DBS-touchtronic_banner.jpg', but obviously it should only be appending ‘/2010/05/DBS-touchtronic_banner.jpg’ rather than the fully-qualified domain.

    I’m using the latest WP version 3.3.1 and there are no additional plugins on the site. Any thoughts?

    http://wordpress.org/extend/plugins/regenerate-thumbnails/

  2. DoctorDR
    Member
    Posted 2 years ago #

    Alex (or anyone else with experience of the function being called by this plugin), could you shed some light on why it is returning this combination of relative and absolute path - and which the plugin expects.

    I presume it is supposed to use the 'relative path', to save unnecessary http calls, therefore it's this portion of the string 'http://www.mywebsite.com/wp-content/uploads' that is surplus to requirements?

    During the lifetime of the database (approx 5 years) the images have moved between servers/hosts but remained within the same domain name. They were also created and have always resided within wordpress.

  3. keriat
    Member
    Posted 2 years ago #

    Hey DoctorDR!
    Here is solution for you — open file plugins/regenerate-thumbnails/regenerate-thumbnails.php
    Then search for text $fullsizepath = get_attached_file( $image->ID ); and put this code after it

    if (stripos($fullsizepath, site_url('wp-content/uploads/')) !== FALSE)
    			$fullsizepath = str_ireplace(site_url('wp-content/uploads/'),'',$fullsizepath);

    Hope it would help you.

  4. delhorno
    Member
    Posted 1 year ago #

    hello keriat

    After making these changes, the fault continues printing: (

    failed to resize. The error message was: The originally uploaded image file cannot be found at

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic