Filename truncated when f=jpeg
oo12 opened this issue · 0 comments
oo12 commented
Using the phpThumb option f=jpeg
when phpthumbof.hash_thumbnail_names is set to No (default) causes 5 characters to be stripped off the end of the filename in an attempt to remove the extension. For images with a 4-character extension (i.e. .png or .jpg) this results in the final character of the base filename being removed. In some cases this causes problems: 1.png
becomes .jpeg
(won't display) or image-1.png
and image-2.png
both become image-.jpeg
.
While f=jpg
works and doesn't trigger the bug, according to the phpThumb documentation, jpeg
is the correct value for the output image format parameter.
The problem is caused by these lines.