-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Improve handling of remote image/jpeg resources #9278
Conversation
I think it's better to add |
Yeah, I went back and forth on that. Instead of choosing the first extension from a somewhat arbitrary list that can vary from system to system, I thought it would be better to choose the "best" one, ensuring consistent builds across multiple systems. // Ubuntu
mime.ExtensionsByType("image/jpeg") --> [.jpe .jpeg .jpg]
// Windows 10
mime.ExtensionsByType("image/jpeg") --> [.jfif .jpe .jpeg .jpg] But I will make the change, adding both Also, please see DM on forum. |
".jpeg": JPEG, | ||
".jpg": JPEG, | ||
".png": PNG, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think I misunderstood the problem. I thought this was a "media type" problem. I see that there are some rooms for improvements in the above, but I suggest that you instead just do the mapping to jpg
early (inside FromRemote
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we should also be able to process local files with .jpe
and .jfif
extensions, so I'll enable that. But yeah, with image/jpeg, it would nice to say "use the .jpg extension if an extension wasn't provided." So I'll do that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Add jpe, jif, and jfif to image/jpeg extensions. For remote image/jpeg without extension, always use jpg extension. Closes gohugoio#9275
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closes #9275