This was partially done for pdf and djvu before. But the metadata field still is quite a large portion (above 80%) of image (and filerevision table).
I built a graph of cumulative size of img_metadata order by size descending (and lumped every 1000 images to 1 to avoid graph from exploding).
| Normal | |
| logscale | |
Based on that and first derivative (which means just comparing sizes), the threshold seems to be around 1400 bytes which only impacts 21% of the files but taking away ~40% of the data.
This should be done after T28741: Migrate file tables to a modern layout (image/oldimage; file/filerevision; add primary keys) is done.

