How does preview image generation work

Can someone explain which previews and why they get generated when running the preview:generate-all occ command?

I’m starting from a fresh install, and copied a large folder in my users folder and started to generate previews.

  • Images in the folder: 6500 Images (no other files in the installation)
  • My settings are max_preview_x/y = 2048, squareSizes/widthSizes/heightSizes="64 256 1024 2048"
  • Currently the Imaginary container logs shows ~3100 requests like this (exactly like this, so I guess only the image payload changes) (all of them return a 200)
    /pipeline?operations=[{"operation":"autorotate"},{"operation":"fit","params":{"width":2048,"height":2048,"stripmeta":"true","type":"png","norotation":"true","quality":"60"}}]
  • Current file count in the preview folder: 28869 (was empty before I started the command)

No matter how I look at this, I can’t make sense of this numbers in combination:

  • The imaginary logs seem to imply that only 2048x2048 previews get’s generated … but that would mean the 3100 requests would lead to 3100 previews… not 28000.
  • If one requests generates previews for more than one image, it still does not make sense… all requests are for 2048x2048 and there are only 6500 previews in this size to generate…
  • I imagine that either the square, landscape or horizontal previews get generated… so 4 for each image… that totals to max 26000 preview images… but there are already 28000 generated and it’s still running

please, someone, enlighten me

ok, figured it out… it generates one preview for:

  • 64 width
  • 64 height
  • 64x64
  • 256 width
  • 256 height
  • 2048 on whatever fits better…

that results in 10 previews for one image… Is there a way to tune this down… I guess 1 square per size and one fitting the size either in landscape or portrait would be enough (totallying in 7 previews per image…) - is there a way to achive this?

Check-out the following description: