create-dmg icon indicating copy to clipboard operation
create-dmg copied to clipboard

Custom DMG icon is gone after uploading and downloading

Open zachgibson opened this issue 6 years ago • 6 comments

When I create my Disk Image it has the custom icon, but then if I upload it to S3 or GitHub and download it, the icon is missing. It might be something I’m doing, but have you ever seen this happen?

Left is original, right is after downloading from GitHub. image

zachgibson avatar Nov 03 '19 18:11 zachgibson

I got the same issue.

nrlquaker avatar Nov 07 '19 17:11 nrlquaker

Checked hashes with shasum -a 256 and size with stat -f%z. Both are the same. But Finder reports different file sizes. For downloaded file Finder displays size the same as stat -f%z. But original file is 1mb larger.

nrlquaker avatar Nov 07 '19 18:11 nrlquaker

I had this problem too, after zipping the dmg and opening it in windows I found out that there is __MACOSX folder beside the dmg file which probably contains the icon. So distributing zip instead of dmg itself resolves the problem although it's not ideal.

rahbari avatar Feb 01 '20 03:02 rahbari

// @manrueda

sindresorhus avatar Feb 09 '20 11:02 sindresorhus

I'm experiencing this behavior as well.

michaelsbradleyjr avatar Jun 12 '20 12:06 michaelsbradleyjr

Here is the answer Compress the DMG before you upload it. There is an invisible side-car file for the DMG (makes no sense to me why). When you compress the DMG the sidecar file is included. When someone downloads the zip file OS X automatically displays the contents of the zip file - the DMG with its icon.

jimmyed2000 avatar Apr 26 '21 12:04 jimmyed2000

As of v7, it only adds a icon to the mounted DMG, not the DMG file, so this is no longer relevant. https://github.com/sindresorhus/create-dmg/releases/tag/v7.0.0

sindresorhus avatar Jan 30 '24 10:01 sindresorhus