Hi. Sorry for the late reply. Yes indeed this could be a problem if you have large non-panorama images in exactly 2:1 ratio, because this is how Files gallery detects panorama sources.
There is no PHP config for this, but there is a Javascript config option, because we need to make function available in JS to detect panoramas. Basically you can make a file _files/js/custom.js
and add the default function:
_c.config = {
panorama: {
// function to detect panorama equirectangular source file
is_pano: (item) => {
var d = item.dimensions;
// >=2048px && ratio 2:1 with 1% pixel margin
return d[0] >= 2048 && Math.abs(d[0]/d[1] - 2) < 0.01;
}
}
}
If you simply want to disable panorama detection, you could use this:
_c.config = {
panorama: {
// function to detect panorama equirectangular source file
is_pano: (item) => {
return false;
}
}
}
If you still have some panoramas, you would you need to figure out some logic as how to detect them. It could be done by name for example, if your panoramas include "pano" in the name.