This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Amy Casillas
Posted Dec 18 - Read on Facebook

I've built a prototype that contains a lot of Sketch layers. It's slow to load, and I think it's because of all the pngs. Does anyone have any suggestions on speeding up load time? Is there any benefit in loading multiple Sketch files vs. one large one? Would flattening the layers that don't need to be directly manipulated help? Thanks for any suggestions!

15 Comments

Cemre Güngör

yes! you should flatten the layers where you dont need to control the sublayers. it will help

Amy Casillas

OK, I'll try that. It looks like the imported folder gets larger, but with fewer files. Hopefully that is an improvement.

Andreas Wahlström

It's a bit cumbersome but if you're dealing with larger projects you can always compress the exported images. I usually use http://pngmini.com

Amy Casillas

Koen, it's an internal company project so I can't share it. I'm pretty sure the problem is in the Sketch files, though. There were hundreds of layered layer groups, and my original imported folder was 30 MBs. I've removed unnecessary layers and flattened a lot, and that is helping. I'm down to 3.7 MB, and 70 pngs.

Johannes Eckert

Is flattening layers supported by appending * to the layer name, instead of flattening them in sketch?

Cemre Güngör

not anymore Johannes Eckert

Amy Casillas

^ too bad! That would have been really helpful. I found a bug in sketch that shifts the new bitmap by 12 pixels when you flatten, so I've had to make a lot of layout adjustments.

Johannes Eckert

That was actually pretty slick. I can't imagine how many navbars, sidebars and toolbars I had that only were needed as single pngs, and the * solved that neatly and cleaned up the DOM structure ...

Koen Bok

Hmm it isn't? Maybe we can add that back. Let's ask Ale Muñoz :-)

Amy Casillas

Ale, I sent it to your support email. I found it was related to flattening groups that were once symbols, and the number of pixels the layer moved varied, so not always 12.

Amy Casillas

Andreas, I downloaded ImageAlpha, and it worked great but I could only compress the images 1 by 1. Is there a way to batch compress?

Andreas Wahlström

Amy Casillas not through the graphical interfaces, unfortunately. but it's possible through the command line: http://jamiemason.github.io/ImageOptim-CLI/ or http://pngquant.org

Johannes Eckert

https://imageoptim.com/ does batch processing

Read the entire post on Facebook