How to disable 3X images to store and optimize?

The files are all stored on disk, the database only holds records of some metadata.