The `CourseRunImageField` is a subclass of the DRF `serializers.ImageField` serializer and that class ignores the `default_validators` and actually just uses Django's image validation which is already correct and does in fact validate that the image content is correct not just that the image extension is correct. The DRF code that does the validation: https://github.com/encode/django-rest-framework/blob/main/rest_framework/fields.py#L1621-L1628 Which actually just calls the Django Image Validators. The Django Field definition: https://github.com/django/django/blob/main/django/forms/fields.py#L712 And you can see that in the [`to_python`](https://github.com/django/django/blob/main/django/forms/fields.py#L721) function of that class it actually checks the image content. This function is never actually called and so it's just misleading.
CMS
===
This directory contains code relating to the Open edX Content Management System ("CMS"). It allows learning content to be created, edited, versioned, and eventually published to the `Open edX Learning Mangement System <../lms>`_ ("LMS"). The main user-facing application that CMS powers is the `Open edX Studio <https://docs.openedx.org/en/latest/educators/concepts/open_edx_platform/what_is_studio.html>`_
See also
--------
* `CMS vs Studio terminology <../docs/decisions/0013-cms-vs-studio.rst>`_
* `CMS vs LMS boundaries <../docs/decisions/0005-studio-lms-subdomain-boundaries.rst>`_