Difference between occ preview:generate-all and preview:pre-generate? 🤔


#1

Does anyone know the difference between these two options?

  preview:generate-all                Generate previews
  preview:pre-generate                Pre generate previews

I want to pre-generate the previews before I visit the gallery page, but isn’t that what the first one does too?


#2

If I use pre-generate and then wait for server to idle, I can see new files being written when I access the gallery page :astonished:


#3

pre-generate generates a single size of preview:

./data/appdata_abcabc/preview/12178/386-256.jpg

generate-all generates all sizes of preview image:

./data/appdata_abcabc/preview/12171
./data/appdata_abcabc/preview/12171/64-43.jpg
./data/appdata_abcabc/preview/12171/193-128.jpg
./data/appdata_abcabc/preview/12171/64-64-crop.jpg
./data/appdata_abcabc/preview/12171/256-170.jpg
./data/appdata_abcabc/preview/12171/32-21.jpg
./data/appdata_abcabc/preview/12171/128-85.jpg
./data/appdata_abcabc/preview/12171/48-32.jpg
./data/appdata_abcabc/preview/12171/512-340.jpg
./data/appdata_abcabc/preview/12171/512-512-crop.jpg
./data/appdata_abcabc/preview/12171/680-680-crop.jpg
./data/appdata_abcabc/preview/12171/128-128-crop.jpg
./data/appdata_abcabc/preview/12171/32-32-crop.jpg
./data/appdata_abcabc/preview/12171/96-64.jpg
./data/appdata_abcabc/preview/12171/771-512.jpg
etc.