Skip to content

Filename truncated when f=jpeg #53

@oo12

Description

@oo12

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions