“Use Quick Look to Retrieve FolderItem Icons” Blog Example

For fun, I downloaded the example there:

and fire it. I selected (as you can see) a .sqlite file:

Here’s the icon of that file in its Finder window:
image

Looks to me as an AppleScript Editor document Icon (I never saw it before).

Yes, this is a LibreOffice document icon.

FWIW.

Well, it is displaying what the OS returns for that file type… Have you tried to uncheck the “QuickLook Preview” CheckBox?

No. I was just “stoned” to have a two different icons for the same file at the same time on screen.

Of course, it may be my laptop (m1/Ventura)…

When “QuickLook Preview” is enabled (in that example, or even when previewing a document in the Finder) the macOS tries to return a “representation” of the contents for the file. Most of the times that one is provided by the apps owning the filetype themselves… if not, the macOS guesses the most close. That is what happened in your selected file for the contents of a SQLite file.

Yes, LibreOffice says to macOS it have an icon for .sqlite files. It is the one that is fired when - by mistake - I double click on it.

XCode have > 26xx images (including icns)… but no .sqlite.
A search for sqlite including system files does not returns that icon…

Is not an icon you can search using the finder. It is in the QuickLook database. You can read more about it at Quick Look - Wikipedia