Viewing 4 replies - 1 through 4 (of 4 total)
  • Any update on this? Running into the same issue here.

    Try replacing
    $fullsizepath = get_attached_file( $image->ID );
    line 365 in regenerate-thumbnails.php with

    $temp_file = download_url(wp_get_attachment_url($image->ID));
    $relative_file_orginal = get_post_meta( $image->ID, '_wp_attached_file', true );
    $file = array(
    'name' => basename($relative_file_orginal),
    'type' => $image->post_mime_type,
    'tmp_name' => $temp_file,
    'error' => 0,
    'size' => filesize($temp_file),
    );
    $saved = wp_handle_sideload( $file, array('test_form' => FALSE), dirname($relative_file_orginal) );
    $fullsizepath = $saved['file']'

    I have not tested it with the plugin you are using but this piece of code at least gives a chance for it to work:)

    PS. Dev, feel free to include this somehow if you think it is worth it

    thanks for this, however it broke my site for some reason. I’d also love to find an alternative way of regenerating thumbs from images that have been off loaded to S3

    It broke your site due to the last character being a ' and not a ;. I know it’s 7 months later, but I landed here after a search, and wanted to point out why the above code broke.

    I did get the code in place, but it didn’t change anything for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Regenerate thumbnails in S3’ is closed to new replies.