Images are locked by .htaccess
An .htaccess can cause Internal Server Errors that are unrelated to PHP.  Bad directives in the file (eg, syntax errors) and using restricted directives (eg, doing an Option + that has been denied by the main Apache configuration) are two likely culprits.  I see the later very frequently with shared hosting.

The only way to really debug this is to find the Apache error log.  This varies from system to system.  On my CentOS machines, they are at

/var/logs/httpd/error_log


If this isn't your location, do a find error_log to track it down.  You may need to be root to read this file.