WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
237 stars 187 forks source link

Consider setting category to 'illustration' for all svgs #1440

Open stacimc opened 2 years ago

stacimc commented 2 years ago

Current Situation

Related WordPress/openverse-catalog#614

Wikimedia sets the category for all records of filetype svg to "illustration". We should consider whether it's acceptable to do this for all providers, and if so we can move that logic to the ImageStore class. Per excellent suggestion by @obulat 😃

Suggested Improvement

If we do this, then we can also remove Wikimedia's extract_filetype method since the MediaStore will already handle extracting filetype from the media URL if filetype is None.

Benefit

Improved category population for more provider scripts, and allows removal of ad-hoc (and duplicated) code from Wikimedia.

Implementation

zackkrida commented 2 years ago

This is interesting in an existential way (i.e. what is an illustration?) and I think currently it simply means "an image that isn't a photograph". Working with that definition, I think this is a great idea.

AetherUnbound commented 2 years ago

+1, this sounds like a great call! It might be good to have a mechanism in MediaStore which can map certain filetypes to certain categories across the board for a media type, unless the category is explicitly defined.