• This repository has been archived on 16/Sep/2020
  • Stars
    star
    335
  • Rank 125,904 (Top 3 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Plugin for Sketch that compresses your bitmap assets, to keep filesize to a minimum.

Image Compressor

⚠️ This plugin is no longer maintained. We recommend using ImageOptim instead.

A Plugin for Sketch that compresses your exported bitmap assets, to keep filesize to a minimum. This Plugin requires Sketch 3.8.

Please note that the compression is lossless, so no pixels will be harmed by running this Plugin : )

Installation

  • Download Sketch Image Compressor & unzip it.
  • Double click Sketch Image Compressor.sketchplugin to install the Plugin.

Usage

The Plugin uses two methods for asset compression:

  • Quick Compression happens automatically, whenever you export an asset from Sketch using the File β€Ί Export… menu option or the Export button in the toolbar. The Plugin will run your PNG & JPG assets through optipng and jpegoptim using the quickest settings for both, so that you get smaller files as fast as possible.
  • Full Compression happens when you choose the Plugins β€Ί Sketch Image Compressor β€Ί Export All Assets menu option. You'll be asked for a path where your assets will be exported, and then the Plugin will export every exportable layer from your document, and run the assets through advpng, optipng, pngcrush, zopflipng, jpegtran and jpegoptim, using more aggressive settings than the Quick Compression (i.e: the operation will be extremely slow)

Please note that both methods won't block Sketch's UI when running, so you'll be able to keep on working while the compressors run. However, running a Full Compression on a non-trivial document will most likely consume a lot of CPU for a long time, so don't expect Sketch to be as snappy as usual : )

You'll get some feedback about the process in the Sketch window while it's running, and some stats when it is done.

Acknowledgements

LICENSE

The MIT License (MIT)

Copyright (c) 2016 Bohemian Coding

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

svgo-compressor

A Plugin that compresses SVG assets using SVGO, right when you export them.
JavaScript
1,097
star
2

SketchAPI

The JavaScript plugin library embedded in Sketch
JavaScript
842
star
3

sketch-document

Monorepo for Sketch document JSON Schemas and TypeScript types
TypeScript
174
star
4

BCCollectionView

A more versatile, faster and lighter replacement for NSCollectionView
Objective-C
166
star
5

fig2sketch

fig2sketch is a command line tool that converts `.fig` files into Sketch design documents (`.sketch`), which can then be opened with Sketch applications.
Python
113
star
6

print-export-sketchplugin

Exports a PDF for printing
Objective-C
86
star
7

unsplash-sketchplugin

Unsplash Data Provider plugin, for Sketch 52+
JavaScript
71
star
8

Coma

A code generator. Takes JSON templates describing a model, and turns them into Objective-C classes.
Objective-C
67
star
9

date-time-sketchplugin

Sketch data plugin generating random dates and times
JavaScript
47
star
10

sketch-assistants

Monorepo containing the official Sketch Assistants, along with utility functions and types for Sketch Assistant development.
TypeScript
44
star
11

sketch-file-format-ts

TypeScript types for the Sketch File Format
TypeScript
44
star
12

nicene

Additional Credo checks
Elixir
38
star
13

SketchTemplates

New document templates for Sketch
33
star
14

sketch-ipsum

A DataSupplier Plugin for Sketch, that fills your text layers with random Lorem Ipsum
JavaScript
28
star
15

sketch-assistant-template

Template repository for a starter Assistant project πŸ›Ž
TypeScript
25
star
16

library-replacer-sketchplugin

A Sketch plugin that allows you to replace a library in a Sketch file
JavaScript
20
star
17

sketch-reference-files

A store of automatically generated Sketch file JSON organised by document version and Sketch feature
JavaScript
20
star
18

plugins.examples.datasupplier

Example plugin which supplies data for Sketch to use
JavaScript
17
star
19

plugins.example.data-translate

A sample plugin that shows how to access a layer inside a Data plugin
JavaScript
14
star
20

color-variables-migrator

A Plugin to migrate colors, Layer and Text Styles to use the new Color Variables feature in Sketch 69
JavaScript
13
star
21

sketch-fusion

Sketch Fusion applies themes to Design System documents.
TypeScript
8
star
22

document-change-sketchplugin

Sample plugin showcasing how to handle document changes such as object addition, deletions and modifications.
JavaScript
8
star
23

vectorbrush

Objective-C
6
star
24

file-format-series-sketch-to-json

Sample code for our File Format series
TypeScript
6
star
25

layers-as-tile-pattern-sketchplugin

A Sketch plugin where you can use layers as a tile pattern to fill a shape
JavaScript
6
star
26

trolleybus

Local, application-level PubSub API for dispatching side effects
Elixir
5
star
27

get-sketch-logs

Shell script for collecting Sketch support logs and system information into a single ZIP archive that can be shared with the Sketch customer support team.
Shell
5
star
28

frontend-code-test

Repository for stuff related to the frontend code test.
4
star
29

GeometryKit

Objective-C
4
star
30

color-tokens-example

JavaScript
3
star
31

sketch-overrides-manager

Manage to enable/disable the new Sketch v94+ overrides in batch
JavaScript
3
star
32

developer.sketch.com

The Sketch Developer website
SCSS
2
star
33

file-format-series-json-to-sketch

Sample code for our File Format series
TypeScript
2
star
34

BCPopover

NSPopover substitute which in vertical mode allows for more control over placement
Objective-C
2
star
35

workspace-webhook-demo

Sample code that shows how to use the webhook feature in Sketch Workspaces
JavaScript
2
star
36

gql-lint

GraphQL linter
Go
2
star
37

sketch-71-symbol-resync

Fixes a missing Library ID issue in Sketch 71
JavaScript
2
star
38

material-icons-library

A proof of concept tool to generate Sketch files from other file formats
TypeScript
2
star
39

qa-info

Plugin for QA
JavaScript
1
star
40

paginator

Elixir
1
star
41

doctor-sketch-file

JavaScript
1
star
42

sketch-assistant-core-rules

Sketch Assistant containing the official core rules
TypeScript
1
star
43

cloud-replacer

A plugin to replace Cloud documents with local files
JavaScript
1
star
44

libwebp

Fork of https://chromium.googlesource.com/webm/libwebp.
C
1
star