Exporting issues (Sketch 97)

Hello everyone, maybe you can help me out with two issues regarding the exporting of assets via the latest (97) Sketch.

Issue #1

Summary:
For a long time, we would export our assets in 2x size. We got 72dpi files with 200% of the resolution. Now with our Sketch update, we get files with 144dpi which don’t work with our pipeline.

Question:
Will there be an option to define the dpi for exports in the future? If not, we are forced to upscale hundreds of asset artboards in multiple Sketch files and downscale the artboards (symbols) in our layouts. A very expensive change for us, so we are forced to return to an older version of Sketch.

Issue #2
Summary: I work on an Game User Interface, we have a lot of painted icons as bitmaps. Since we provide our assets for a mobile AND browser version of the game, we downscale high res assets (symbols containing bitmaps) and export different sizes.
Here is the problem: when exporting a down scaled bitmap, the file get’s way more blurry than needed. If we downscale the asset with Photoshop, the result is waay better. Feels like this could be a bug and this is probably not too known because most of the users are probably working with vector icons.
Maybe you have an idea how to handle this without having to use a Photoshop script to shrink all the assets afterwards everytime we export something?
Thanks for reading and hopefully also for your help!

Hello there Pietzen :wave:

More than happy to help you out with this, although it might be possible we need more information to give a more assertive answer

Issue #1

You mentioned that the new Sketch update is exporting files with a different dpi than previous versions. To help resolve this, we’d love to know which versions of Sketch you’ve been using and the exporting settings you’ve been using. This will allow us to identify any issues or adjustments we need to make. We’ve received similar reports in the past, but there’s always a logical explanation for behavior like this.

Issue #2

Regarding the shared description, we may have dealt with this before, but we want to make sure we understand the issue by reviewing a sample document. That way, we can provide you with a more assertive solution.

To ensure your privacy, we recommend sending us an email to productsupport@sketch.com with the additional information. This will guarantee that any shared documents are kept private and secure.

We’re eager to hear back from you and help you

Cheers :pray:

Hi there Cristiana,

the version is today’s latest: Version 97 (173164)
Export settings: PNG, @2x

I hope this thread here is helpful for others as well, that’s why I just created a Sketch file showing my two issues. So there are no worries about privacy with this simple example - I hope it works for you!

the_sketch_issues.sketch (1.4 MB)

Hey Pietzen,

Thank you for sharing all this data. Let us have a look at it.
Could you tell us what is the “older version of Sketch” you returned too? Just so we can make some tests.

Cheers :pray:

It’s Sketch 94 :blush:

Hey there Pietzen :wave:,

We have been reviewing this and this is our findings:

Issue #1

In newer versions of Sketch (96 onwards), the concept of DPI (dots per inch) has undergone some changes Previously, when you exported an image at 2x, it was strictly associated with doubling the dimensions of the image. However, in the newer versions, the 2x export is not only tied to the dimensions but to the image’s resolution as well.

This change is because the export process has been optimized to display the correct resolution rather than the correct size. As a result, the DPI is now exported as double the amount to ensure that the image appears at the intended resolution. In terms of how re-importing the image will show in Sketch, keep in mind it will display the size it was set at initially but with double the resolution/pixels.

To overcome this situation and export an image at a specific size, you can replace the “2x” designation with the desired size. For example, if you want to export a 120-pixel-wide artboard as 240 pixels wide, you can replace the “2x” with “240w” in the export settings.

By making this adjustment, you can ensure that the exported image will have the desired dimensions.
CleanShot 2023-06-19 at 16.27.54

Issue 2:

Upon receiving your document, we could reproduce your initial statement where Sketch, when scaled down, blurs the image. Still, we were able to link this behavior to how the odd measures of the document, and we can correct this within Sketch.

So the first thing we did was to size the artboard to the artwork image. Then we created a 120 by 120 artboard and introduced an instance. I made sure to introduce the image size in accordance with the original artboard, and when exported, the image is now presented with a sharper resolution.

Please review the video: Sharper image.mp4 - Google Drive

I hope :crossed_fingers: this can help.

Cheers :pray:

Thank you very much for your help!

I think I understand the solution for the second issue. In the end it was more about odd pixels instead of a resample technique. It should be easy for us to give the artboard the exact bitmap size.

For the first issue, it is a valid solution, but it still introduces an additional effort, that we didn’t had before. That is always a bummer, when Software changes behaviours afterwards (exept it is exactly what you needed). If we would be able to type in “200%” in the size dropdown, it would make it very nice for us. Otherwise we have to go through a lot of artboards in older documents and type in the new width manually. Or we just double all our sizes (symbols AND layout) and export 0.5x assets in the end.

I found your help very useful, these two recurring topics were sticking in our team quite some time. Thank you for your effort :+1:

1 Like