Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Images with missing/wrong extensions #1247

Closed
NielsKSchjoedt opened this Issue · 3 comments

3 participants

@NielsKSchjoedt

I have been struggling a lot with issues concerning remote image paths that does not have a regular image extension, and hence cannot be processed by carrierwave. This is often the case with remote images on image servers etc. E. g. "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSbK2NSUILnFozlX-oCWQ0r2PS2gHPPF7c8XaxGuJFGe83KGJkhFtlLXU_u" The file does not have a .jpeg extension, but the content_type is always correct in those examples. In this case Kernel.open would return "content-type"=>"image/jpeg".

The other day I stumbled upon this solution http://stackoverflow.com/a/19384117/1002814 and I'm wondering why this is not the default actually?

@taavo
Collaborator

Until yesterday this would've required adding a mime-types dependency. But now, as we already have one, I don't see any reason an approach like this shouldn't be the default.

@bensie
Owner

Agreed.

@bensie
Owner

Closing in favor of #1248

@bensie bensie closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.