Thread Starter
RL
(@yofazza)
Arr!
- Checked that both functions exists (in wp-includes/media.php and wp-admin/includes/image.php)
- Manually include wp-admin/includes/image.php before image_resize() is called in my function (because I thought it’s an “admin only” inclusion)
- Error: Functions in wp-admin/includes/image.php is defined twice (wp-admin/includes/image.php is included twice – and I can’t use include_once() because the second inclusion is after my function is called)
- Recreate image_resize() and wp_load_image() functionality in my function
- Problem solved, inefficiently
I created my function in wp-content/themes/_themename_/functions.php. Don’t know if I will not have this problem or not, if I create my function as a plugin (don’t want to create a plugin because this is a theme-specific function).
I think WordPress should include wp-admin/includes/image.php before including the theme’s functions.php, no?
Anonymous User
(@anonymized-126485)
Grmph. Yes, problem exists for plugins. I am trying to write a plugin and encountered this error.
This is still broken in trunk version 11794 as of 2009-08-09.
Thread Starter
RL
(@yofazza)
Btw which is more efficient if we consider server process, bandwidth, bulky code, and possible native create_custom_thumbnail_size() function in the future?
#1: To recreate the resizing functions.
#2: Or to just use the smallest thumbnail size and change the dimension in HTML output? The “stretched/crippled” image will be hardly noticed if it’s small.
😀