Sometimes the file extension does not tell the truth.
Check the real MIME type of the file. Use something like exiftool.
For example: You have your_notjpg_file.jpg
, but this file's mime is image/webp
,
then add this MIME Type to the jpg extension in config file:
./application/config/mimes.php
.
'jpg' => array('image/jpeg', 'image/pjpeg', 'image/webp'),
Or rename that file before update to the correct extension, and be sure,
that this extension is in mimes.php
and in your upload config:
$config['allowed_types'] = 'gif|jpg|jpeg|png|webp';
I have had similar problem when I tried to upload some thumbnail images from Youtube.
All of them were with jpg extension.
As it turned out, jpg was not jpg, but webp.
This worked for me.