Skip to content

Image file names shouldn’t assume JPEG #8

@dhouck

Description

@dhouck

Currently, all the profile images are assumed to be JPEGs. However, there are a lot of PNGs and a few GIFs. I thought I had a fix for this, but unfortunately it assumes the images are downloaded in extract_all.py, which is run before downloading images. As the chapter pages don’t give any details about image type, I think we will be unable to figure out internal file name until after the images are downloaded.

There was previously some discussion here about using the MIME type the server provides or determining it ourselves. At the time, I thought the drawback to using the server-provided MIME type was adding another stage, but since that looks inevitable now, I think that is actually the best approach. Both add an extra dependency, but the one for using the MIME type is smaller; additionally, the server-provided MIME type is probably faster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions