plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
246 stars 186 forks source link

image scaling produces many db writes when no scale is given #3678

Closed MrTango closed 1 year ago

MrTango commented 1 year ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

having an image tag like this in TinyMce:

<img src="resolveuid/ee2c714fee474162b9ac06f13726cebb/@@images/image" 
  data-linktype="image" 
  data-scale="teaser" 
  data-val="ee2c714fee474162b9ac06f13726cebb" />

which results to something like this after outputfilter:

<img 
      src="http://localhost:8080/Plone5/img_20211201_144214-1.jpg/@@images/image-0-e23105cafb2c9775c00d1f38a88a73c3.jpeg"
      width="7872" height="2916">

What I expect to happen:

I should see the original image without database writes for every view.

What actually happened:

The original image is shown, but with database writes for every view.

What version of Plone/ Addons I am using:

6.0.0rc1

MrTango commented 1 year ago

@mauritsvanrees I'm investigating this, but maybe you can ping me when you have a moment, so that we can decide on what level we want to cover this.