Open stacimc opened 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.
+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.
Current Situation
Related WordPress/openverse-catalog#614
Wikimedia sets the
category
for all records of filetypesvg
to "illustration". We should consider whether it's acceptable to do this for all providers, and if so we can move that logic to theImageStore
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