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

Support webp format for image upload #9118

Closed
icncsx opened this issue Jul 5, 2020 · 12 comments
Closed

Support webp format for image upload #9118

icncsx opened this issue Jul 5, 2020 · 12 comments
Labels
area: images serving and manipulating images

Comments

@icncsx
Copy link
Contributor

icncsx commented Jul 5, 2020

Issue

webp is a popular image format originally developed by Google. I get an "Image has an unsupported type" error when I try to upload a webp image.

Is this something we can possibly support?

@rhymes
Copy link
Contributor

rhymes commented Jul 5, 2020

Thanks for the issue! We'll take your request into consideration and follow up if we decide to tackle this issue.

To our amazing contributors: issues labeled type: bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @thepracticaldev/oss and we will follow up within 3 business days.

For full info on how to contribute, please check out our contributors guide.

@subodhk01
Copy link

@icncsx Can you describe where exactly you are trying to upload the image?

@rhymes
Copy link
Contributor

rhymes commented Jul 6, 2020

@subodhk01 I guess the article uploader or the comment uploader, neither supports webp in input.

@icncsx
Copy link
Contributor Author

icncsx commented Jul 6, 2020

@rhymes you got it!

@nickytonline
Copy link
Contributor

The article image uploaders support it on the frontend. It's the backend that can't process it. See the accept="image/*" attribute.

image

image

@rhymes
Copy link
Contributor

rhymes commented Oct 1, 2020

Even though I previously assigned myself here and created a draft PR #9156, I'm going to relinquish this as I think it's going to be addressed by us switching to imgproxy and that's the work that @maestromac and @jdoss have been doing. I don't think it's worth the effort to try to add WebP support to carrierwave.

Will imgproxy be webp-enabled @maestromac ?

@rhymes rhymes removed their assignment Oct 1, 2020
@maestromac
Copy link
Contributor

@rhymes Webp is supported on Imgproxy but we would still need to update Carrierwave too because it is the first recipient of the uploaded content, then it get modified/cached by Imgproxy.

@cmgorton cmgorton added area: images serving and manipulating images and removed area: image uploading labels Jan 18, 2021
@mstruve
Copy link
Contributor

mstruve commented Feb 10, 2021

@vaidehijoshi I feel like this might need product sign off before deciding to support another upload type. What are your thoughts?

@vaidehijoshi
Copy link
Contributor

@mstruve supporting webp is a very developer-specific route; looking at our current set of priorities and product statement, I would say that this is something we might be able to support within the broader forem ecosystem down the road, but I don't think we have the bandwidth to implement and maintain this right now

@rhymes
Copy link
Contributor

rhymes commented Feb 11, 2021

A quick non empirical investigation: upload from phone works, that's because smartphones don't store images in webp and, at least for the iPhone, even if they store images in HEIC, they're smart enough to convert them to JPG pre-upload. I can't upload HEIC to Forem (verified by sending a photo taken from the iPhone to the desktop computer via Airdrop to avoid conversion).

I'm quite confident Android uses JPEG internally as well. So on the mobile front we're covered.

System level screenshots are usually in PNG and we support that. Photo editing apps usually export either in raw formats or in JPEG or PNGs. Photoshop for example, doesn't natively support WebP as a format, only through a plugin to be installed manually.

The only scenario where WebP upload is probably needed is when someone downloads an image that's already a WebP and wants to upload it to a Forem, which, again without any empirical data, it doesn't seem to happen very often (and it's one export/conversion away anyway).

Don't know of any other scenarios where WebP as an imported format might be required.

So yeah, we'll eventually need this but not right now.

@cmgorton
Copy link
Contributor

@mstruve supporting webp is a very developer-specific route; looking at our current set of priorities and product statement, I would say that this is something we might be able to support within the broader forem ecosystem down the road, but I don't think we have the bandwidth to implement and maintain this right now

Given Vaidehi and Rhymes's response I am going to go a head and close this issue for now and we can revisit this kind of feature request in the future.

@joshuacortes
Copy link

WebP is required as a next gen format, when we will receive it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: images serving and manipulating images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants