Forums

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

  1. DoctorDR
    Member
    Posted 4 months 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 4 months 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 4 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic