swift – MacOS – Cocoa – Generating Thumbnail with Background template

When using QLThumbnailGenerator.shared.generateRepresentations I’m not able to retry the image preview thumbnail with the white padding (for image cases) like Finder does.

I’m able to retrive just the image its self without the background. This is how Finder renders icon for for text files, the folding paper corner and the contents of the file

enter image description here

Can you tell me please what I’m doing wrong?

This is how finder looks like for image.

enter image description here