[resolved] BUG: wp_generate_attachment_metadata is missing function (4 posts)

  1. thinkstorm
    Posted 6 years ago #

    in /wp-admin/includes/image.php the function wp_generate_attachment_metadata is calling image_make_intermediate_size for each resize. This function should be in /wp-admin/includes/media.php but vanished from 2.6.5

    This function is called to generate thumbnails. I discovered this bug (?) while debugging the "Regenerate Thumbnails" plugin

    Any suggestion? Did I look in the wrong place?

    Cheers, Thorsten

  2. thinkstorm
    Posted 6 years ago #

    Mea culpa: the function image_make_intermediate_size is of course defined in /wp-includes/media.php. The problem for my thumbnails seem to be the GD function imagecreatefromstring that is called within wp_load_image in /wp-admin/includes/image.php.

    This is a bit strange: when I use the file upload function within "write post", JPGs are uploaded and thumbnails are created according to the Settings->Misc page. I am under the impression that media_handle_upload in /wp-admin/includes/media.php does call
    wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
    which is the same call I am trying to do. However, my call fails, the upload call succeeds... back to the drawing board...

  3. Does it matter what file the function is in? WordPress loads all of the files anyway.

    I just tested the plugin and it works fine for me with 2.7.

  4. thinkstorm
    Posted 6 years ago #

    no, but it needs to be in one of the files ;) I figured out that the problem is memory allocated on my server for image operations. A setting i cannot change sufficiently, so I just upload smaller images as a workaround.

Topic Closed

This topic has been closed to new replies.

About this Topic