Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Actually I manage to do what I needed in a wp_generate_attachment_metadata hook.

    I am trying to find a hook that as well.
    A hook that executes after wp_generate_attachment_metadata and wp_update_attachment_metadata so I can get the file names of the intermediate image sizes.

    Didn’t see one in image.php

    Thread Starter ch3

    (@ch3)

    This code also doesn’t seem to do anything neither give any errors, whether I run it on a file that has been already added to the library or not.

        $img_path = 'D:/myStuff/ch3/web/v4.ch3.gr/file/ch3_102-17.jpg';
        $gd_image_editor = new WP_Image_Editor_GD($img_path); 
        $gd_image_editor->load(); 
        // $gd_image_editor->resize(300,450,false); 
        $gd_image_editor->multi_resize(get_intermediate_image_sizes());
        $gd_image_editor->save($img_path);

    Does it matter that I set a different upload directory?
    define('UPLOADS', 'file');

    Thread Starter ch3

    (@ch3)

    I tried and deleted one of the resized files from disk and also removed one of the size entries in the image_meta. When I run the command again it still produced the same results without generating the missing thumbnail.
    What else do I need to do to force WP to regenerate the thumbnails of an already uploaded image?

    Thread Starter ch3

    (@ch3)

    Thank you so much for looking into this. I will spend some time later on to try and implement what you indicate. I really appreciate you taking the time.

    Thread Starter ch3

    (@ch3)

    Thank you for your quick response.
    I am not using any other plugins at the moment and for the shake of debugging I am just running the php command on local files without importing them into the library.
    If you have time, you can try these two files.

    https://pub.ch3.gr/iptc_broken.jpg
    https://pub.ch3.gr/iptc_fixed.jpg

    It’s the same photo where I’ve added random data in various fields.
    iptcparse($info[‘APP13’]) doesn’t return anything on iptc_broken.jpg

    I believe during a period of time, Camera Raw was exporting the jpegs in a different way than in the very past and now. Even if I remove all metadata on those problematic files using ExifPilot and add them back on using either photoshop or Expression Media, IPTC is still unreadable. The only way would be to re-export everything with the current version of Camera Raw and re-apply the metadata from my catalog. That would fix the problem, but it’s a painful process due to the number of photos. Also ideally I would like my website to deal with these odd cases in case it starts happening again in the future.

    thanks a lot for your time.

    Not really, unless if you find/write code to convert the nextGen gallery into the native WP gallery. Images in each gallery system, lives in different database tables and folders.

    On no…
    I’ve spend the last month or two developing my new site around this plugin and I wasn’t aware of that. I hope it’s not the case, or there is a solution.

    I am not an expert… but maybe that’s depending on how you present the images through the gallery. Maybe try making a post with a single pic shortcode [singlepic id=??] and temporary edit the wp-content\plugins\nextgen-gallery\view\singlepic.php

    with just a simple image tag to render the whole image, rather than using lightbox or any other pop up gallery

    <img src="<?php echo $image->imageURL ?>" alt="<?php echo $image->alttext ?>" title="<?php echo $image->alttext ?>" />

    Otherwise, are you sure you don’t have a special rule in robots.txt or something?

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