---
title: Thumbnail icons for Delish bookmarks
date: 2013-07-03 23:35
slug: thumbnail-icons-for-delish-bookmarks
categories:
- Code
tags:
- bookmarking
- finder
- icons
- macos
- qlmanage
- sips
- terminal
---

So, what are normal people doing tonight?

I've been messing around with some more ideas surrounding the future of bookmarking and information gathering. As part of that process, I bought [Delish](https://itunes.apple.com/us/app/delish/id504472899?mt=12&partnerId=30&siteID=vRL5rYo4h5A) and started messing around with some Spotlight/Finder integration[^dh]. I won't go into all of the kMDItemAwesome of that, but I did work out a trick on the way that might actually be useful.

[^dh]: Delish and [HoudahSpot](http://www.houdah.com/houdahSpot/) make a potent combo.

The thumbnails for Delish cache folders (and what shows up in a Finder Smart Folder) are all... broccoli? I figured it shouldn't be too hard to make them prettier for searching. The technique should be able to be applied to any application's files which provide a Quick Look preview.

[![YouTube video](https://img.youtube.com/vi/lmeZhW4nIkk/hqdefault.jpg)](https://www.youtube.com/watch?v=lmeZhW4nIkk)

[Watch on YouTube](https://www.youtube.com/watch?v=lmeZhW4nIkk)

Here's the script:



```shell
#!/bin/bash

target=$1
filename=`basename $1`
image="${TMPDIR}${filename}.png"
rsrc="${TMPDIR}icn.rsrc"

# Create a thumbnail from the file preview
qlmanage -t -s 512 -o ${TMPDIR} $target

# apply the image to itself as an thumbnail icon
sips -i $image

# Extract the icon resource
DeRez -only icns $image > $rsrc

# Make the target accept a custom icon
SetFile -a C $target

# Apply the icon resource to the target
Rez -append $rsrc -o $target

# clean up
rm $rsrc $image
```

[View the code on GitHub](https://gist.github.com/5924787)



Pointless in this particular case, but if I can get you to use it, I can feel good about my wasted evening.

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
