phpphpthumb

Could not determine format of remote image


I am trying to resize a local image through phpthumb library and it is giving following exception for specific image:

Exception Object
(
[message:protected] => Could not determine format of remote image: http://localhost/brandmenowcrm/upload/products/UC102 Yellow.jpg
[string:Exception:private] => 
[code:protected] => 0
[file:protected] => /var/www/html/brandmenowcrm/application/third_party/phpthumb/ThumbBase.inc.php
[line:protected] => 193
)

When i check this image in browser it is working successfully. enter image description here


Solution

  • I suggest you to check get_headers function to verify the format of the file (eg: content_type).

    Also if you are using http://localhost/brandmenowcrm/upload/products/UC102 Yellow.jpg, then please try to use absolute file path instead of URL.