WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] BUG: wp_generate_attachment_metadata is missing function

[Resolved] BUG: wp_generate_attachment_metadata is missing function

  • thinkstorm

    @thinkstorm

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • thinkstorm

    @thinkstorm

    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…

    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.

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] BUG: wp_generate_attachment_metadata is missing function’ is closed to new replies.
Skip to toolbar