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

Trouble image extension uppercase #26

Closed
maxvoronov opened this issue May 25, 2015 · 1 comment
Closed

Trouble image extension uppercase #26

maxvoronov opened this issue May 25, 2015 · 1 comment

Comments

@maxvoronov
Copy link
Contributor

Hi @ojhaujjwal ,

I found the following problem. Adding image with extension in the uppercase (for example, *.JPG), we get an exception "A field name was provided without a field value." > header('Content-type', NULL).

Investigate the problem I guess the problem in this method:
https://github.com/hrevert/HtImgModule/blob/master/src/View/Strategy/ImageStrategy.php#L110

One solution to the problem - add strtolower to variable $format.
Another solution - add option 'format' => 'jpeg' to config. But unfortunately, this option is not specified in the documentation.

Regards

@ojhaujjwal
Copy link
Member

return $mimeTypes[strtolower($format)]; should be enough. Do you mind sending a PR?

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

2 participants