Django & Cloudinary - Admin Panel Image Upload Returns Error "This res.cloudinary.com page can’t be found"

I have the following Teacher model:

class Teacher(models.Model):

...    
    # Image Field
    image = models.ImageField(upload_to='teacher_images/', blank=False, null=False)  

    # Metadata
...
    class Meta:
        verbose_name = "Teacher"
        verbose_name_plural = "Teachers"
        ordering = ['name']
        indexes = [
            models.Index(fields=['email']),  
            models.Index(fields=['department']),  
        ]
    





        

And in my settings.py:

cloudinary.config( 
    cloud_name = "dce5bvfok", 
    api_key = "622363596588819", 
    api_secret = "v9J64YEaRrGODOEUz_8P_0dpYb0", 
    secure=True
)

# Set default storage backend to Cloudinary
DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'
MEDIA_URL = 'https://res.cloudinary.com/dce5bvfok/image/upload/'

Yet when I navigate to the admin panel to upload an image, the URL formats correctly. For example: https://res.cloudinary.com/dce5bvfok/image/upload/teacher_images/hsu2-min.JPG. However, I can't actually view the image as I receive this error when navigating to the generated URL:

This res.cloudinary.com page can’t be found
No webpage was found for the web address: https://res.cloudinary.com/dce5bvfok/image/upload/teacher_images/hsu2-min.JPG
HTTP ERROR 404

Does anyone know why this is occurring and how to rectify it?

Back to Top