Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filename truncated when f=jpeg #53

Open
oo12 opened this issue Jun 29, 2013 · 0 comments
Open

Filename truncated when f=jpeg #53

oo12 opened this issue Jun 29, 2013 · 0 comments

Comments

@oo12
Copy link

oo12 commented Jun 29, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant