It's taking too long, and sometimes I get an execution time out.

The problem is in function imce_image_info($file) that resides in inc/page.inc file. This function is calling getimagesize on any type of file, and for big files this function is taking unnecessary process time to return the fact that the file is not an image.

Getimagesize should be called only on known image files that are indeed supported by this function.

CommentFileSizeAuthor
#1 check_extensions_before_getimagesize.patch771 bytesjamuraa

Comments

jamuraa’s picture

Status: Active » Needs review
StatusFileSize
new771 bytes

This patch should fix this issue. It checks the file extension to make sure that it is a jpeg, jpg, gif, or png because those are the only ones that we use the filesize of anyway.

ufku’s picture

Status: Needs review » Fixed

committed. thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.