• I am using GD libraries in order to modify the uploaded attachment so I can have always the crop at the same squared dimensions with white stripes top/bottom or left/right if the image is not squared

    While i’m using add_filter with wp_generate_attachment_metadata I cound not get all the attachments, so I let it generates it with

    $new = wp_generate_attachment_metadata($id, $file );
    wp_update_attachment_metadata( get_attachment_id($file $new );

    but everytime I regenerate the images with Regenerate Thumbnails plugin I get this error
    function (){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this}
    and in the browser console I get
    Failed to load resource: the server responded with a status of 404 (Not Found) relative to the wp-admin/admin-ajax.php file

    no errors in log so i don’t know what kind of error is

    In php.ini i have

    upload_max_filesize = 256M
    upload_max_postsize = 256M

    How can i debug this errors?
    Or, do you know any other way in order to get what I’m trying to do?

    Thank you for your answers

  • The topic ‘hook wp_generate_attachment_metadata does not read all the attachments’ is closed to new replies.