#51174 closed defect (bug) (fixed)
wp 5.6 missing function is_gd_image
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | 5.6 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
Hi
In wordpress 5.6 i get this error
Uncaught Error: Call to undefined function is_gd_image() in /var/docs/server.tst/public/wp-includes/media.php:3475 Stack trace:
The function does not seem to exists and there is no check added before calling it.
Thank you for creating with WordPress.
You are using a development version (5.6-alpha-48899).
Please provide a fix
Change History (7)
#2
@
4 years ago
- Component changed from General to Media
- Keywords reporter-feedback added
- Milestone changed from Awaiting Review to 5.6
Thanks for the report!
The function was added in [48798] / #50833.
As noted in comment:7:ticket:50833, while some media functions can be called on front end, is_gd_image()
is currently only defined in the admin, and should probably be available on front end too.
Could you share some details about how you're using wp_imagecreatetruecolor()
? Is it for image creation or editing on front end?
#3
@
4 years ago
@SergeyBiryukov
Yes we have a buildin image resizing that kicks in while users load a page in the front end and or resize their screens.
Please consider adding the function is_gd_image() also for the wordpress front-end
Thank you
#4
@
4 years ago
- Keywords needs-patch added; reporter-feedback removed
- Owner set to SergeyBiryukov
- Status changed from new to accepted
That helps, thanks :)
it seems to happen calling this function wp_imagecreatetruecolor()
if i change the code is_gd_image back to is_resource then it works fine.
f.e. if you add this into the theme functions.php you get the error.
$width=400;$height=250;
$newimage = wp_imagecreatetruecolor( $width, $height );