Title: BUG: wp_generate_attachment_metadata is missing function
Last modified: August 19, 2016

---

# BUG: wp_generate_attachment_metadata is missing function

 *  Resolved [thinkstorm](https://wordpress.org/support/users/thinkstorm/)
 * (@thinkstorm)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/bug-wp_generate_attachment_metadata-is-missing-function/)
 * 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)

 *  Thread Starter [thinkstorm](https://wordpress.org/support/users/thinkstorm/)
 * (@thinkstorm)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/bug-wp_generate_attachment_metadata-is-missing-function/#post-920781)
 * 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…
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/bug-wp_generate_attachment_metadata-is-missing-function/#post-920981)
 * 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.
 *  Thread Starter [thinkstorm](https://wordpress.org/support/users/thinkstorm/)
 * (@thinkstorm)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/bug-wp_generate_attachment_metadata-is-missing-function/#post-921072)
 * 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 ‘BUG: wp_generate_attachment_metadata is missing function’ is closed to
new replies.

## Tags

 * [resize](https://wordpress.org/support/topic-tag/resize/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [thinkstorm](https://wordpress.org/support/users/thinkstorm/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/bug-wp_generate_attachment_metadata-is-missing-function/#post-921072)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
