TYPO3 get all Images without References

144 Views Asked by At

It seems not possible to use the Filelist Module to get a list of all unused images (I mean all images without references). I checked the extensions, but it seems there is no Extension for this task. What are possible solutions to this?

Thanks

1

There are 1 best solutions below

0
Julian Hofmann On BEST ANSWER

One way would be a SQL query. In a very simple example it could look like this:

SELECT * FROM sys_file WHERE uid NOT IN (SELECT uid_local FROM sys_file_reference)

Each "used" file should have an entry in the sys_file_reference table. So, every file (sys_file-record) with no occurrence in sys_file_reference should be unused.

Be careful! Besides references to single files, files can be in use via folders. The query above does not check these uses.