Search code examples
djangodjango-cms

In djangocms-picture how to set a default maximum image size?


I would like to set a default maximum size of images in the djangocms-picture plugin. I would like to do this at template level.

This simple template for example:

{% load thumbnail %}
<img src="{% thumbnail instance.img_src 'golden_ratio_xlarge' %}">

Gives this error:

SuspiciousFileOperation at /en/

The joined path (/media/filer_public_thumbnails/filer_public/a3/07/a3073ea1-a798-43c0-869f-689de5f53e7e/sawa.png__420x233_q85_subsampling-2.png) is located outside of the base path component (/home/mogoh/src/git.noc.ruhr-uni-bochum.de/ceres/website/ceres/media)

Solution

  • I have solved this one.

    Important points