Closed ctolkien closed 9 years ago
And re: image forma ('format' attribute)t:
Let me know if this was addressed elsewhere in the API (I couldn't spot it).
AH!
re: <img ... format="jpg" />
I'm not putting that in, on purpose. Like seriously .. why the fuck do we care about the format?
re: <category name="House" />
How the hell did that get missed?
/me double checks that I haven't done that elsewhere.
I'm not putting that in, on purpose. Like seriously .. why the fuck do we care about the format?
We have to scrap these from a remote server in the URL provided - I don't trust the mime type provided by the 3rd party and there is no file extension to go by... Need someway of knowing what type of image it is (preferably w/o cracking the file open).
but why? it's an image. who cares? most people (from the data i've seen) it's all jpg
.. it's like they don't care and just keep it with that value.
downloading the urls and then storing them in S3 amazon / Azure blob / etc ... is totally np with/without the extension type.
but why? it's an image. who cares?
Browsers :) I don't want to send a PNG image down with a image/jpeg mime type (for instance) telling the browser to decode the image as a PNG when it's not. It will still probably work - browsers are very resilient at handling incorrect things, but it may generate a warning and is not ideal.
How is your browser sending an image down with a jpeg mine type, when the image is actually an PNG?
<img src="http://your.website.com/images/rental1.jpg" alt="pew pew"/>
??
Here's the issue, I'm scraping the images from a 3rd party the XML comes in as:
<img id="m" modTime="2009-01-01-12:30:00" url="http://www.3rdparty.com/abcdefg" format="jpg" />
Without the "format" attribute (and remembering I don't trust the mime type provided by the 3rd party), how am I to determine if it's a jpg or png (or gif, or whatever)?
how am I to determine if it's a jpg or png (or gif, or whatever)
you don't :) the browser just displays the image. Magic!
Magic!
Not magic! It already knows it's a GIF, it's in the response headers:
Content-Type:image/gif
As I said, browsers will generally deal, but it's relying on hacky behaviour (and they may not get the full features, for instance, progressive jpegs may not load progressively if not served with the correct mime type).
RE: Category type. Already done.
Closing this one PK! but still want my content type support at some stage for images :dancer:
@ctolkien can you please post a snippet of the xml (from the rea xml source) which this PR is addressing, please?