expo-optimize
Compress the assets in your project
Last updated 10 days ago by brentvatne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install expo-optimize -g
SYNC missed versions from official npm registry.

???? Welcome to
expo-optimize

Compress the assets in your project

Circle CI


This library uses the natively powered package Sharp behind the scenes to optimally reduce your project's assets for use in an app or website.

???? Notice: This package is not limited to Expo projects! This can be used with projects bootstrapped with community CLIs like ignite by Infinite Red, or react-native-cli by the React Native community.

???? Usage

# Run this once to install the sharp image processing utility.
# If this cannot be installed on your computer then you won't be able to optimize images.
npm install -g sharp-cli

# To optimize images simply run this
npx expo-optimize <project-directory> [options]

???? Why?

We created optimize to improve our docs and websites (Next, Gatsby, React), and our native apps (React & Expo). Optimizing images can noticeable improve your native app and website's TTI (or time-to-interaction) which means less time on splash screens and quicker delivery over poor network connections.

⚙️ Options

For more information run npx expo-optimize --help (or -h)

Shortcut Flag Input Description Default
-q --quality [number] The quality each image will attempt to be reduced to 80
-i --include [pattern] Include only assets that match this glob pattern relative to the project root expo.assetBundlePatterns: [] in the app.json
-e --exclude [pattern] Exclude all assets that match this glob pattern relative to the project root '**/node_modules/**', '**/ios/**', '**/android/**'
-s --save Save the original assets with a .orig extension
-h --help output usage information
-V --version output the version number

???? Further Reading

Read more about how this package works here: Image compression in Expo projects.

Related

  • sharp - native image editing library for node
  • expo-cli - the original location for this command

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.


License: MIT

Current Tags

  • 0.1.58                                ...           latest (10 days ago)

69 Versions

  • 0.1.58                                ...           10 days ago
  • 0.1.57                                ...           15 days ago
  • 0.1.56                                ...           a month ago
  • 0.1.55                                ...           a month ago
  • 0.1.54                                ...           a month ago
  • 0.1.53                                ...           a month ago
  • 0.1.52                                ...           a month ago
  • 0.1.51                                ...           a month ago
  • 0.1.50                                ...           a month ago
  • 0.1.49                                ...           a month ago
  • 0.1.48                                ...           a month ago
  • 0.1.47                                ...           2 months ago
  • 0.1.46                                ...           2 months ago
  • 0.1.45                                ...           2 months ago
  • 0.1.44                                ...           2 months ago
  • 0.1.43                                ...           2 months ago
  • 0.1.42                                ...           3 months ago
  • 0.1.41                                ...           3 months ago
  • 0.1.40                                ...           3 months ago
  • 0.1.39                                ...           4 months ago
  • 0.1.38                                ...           4 months ago
  • 0.1.37                                ...           4 months ago
  • 0.1.36                                ...           4 months ago
  • 0.1.35                                ...           4 months ago
  • 0.1.34                                ...           4 months ago
  • 0.1.33                                ...           4 months ago
  • 0.1.32                                ...           5 months ago
  • 0.1.31                                ...           5 months ago
  • 0.1.30                                ...           5 months ago
  • 0.1.29                                ...           5 months ago
  • 0.1.28                                ...           5 months ago
  • 0.1.27                                ...           5 months ago
  • 0.1.26                                ...           6 months ago
  • 0.1.25                                ...           6 months ago
  • 0.1.24                                ...           6 months ago
  • 0.1.24-alpha.0                                ...           6 months ago
  • 0.1.23                                ...           6 months ago
  • 0.1.22                                ...           6 months ago
  • 0.1.21                                ...           6 months ago
  • 0.1.20                                ...           6 months ago
  • 0.1.19                                ...           6 months ago
  • 0.1.18                                ...           6 months ago
  • 0.1.17                                ...           7 months ago
  • 0.1.16                                ...           7 months ago
  • 0.1.15                                ...           7 months ago
  • 0.1.14                                ...           7 months ago
  • 0.1.13                                ...           7 months ago
  • 0.1.12                                ...           7 months ago
  • 0.1.11                                ...           7 months ago
  • 0.1.10                                ...           7 months ago
  • 0.1.9                                ...           7 months ago
  • 0.1.8                                ...           7 months ago
  • 0.1.7                                ...           7 months ago
  • 0.1.6                                ...           7 months ago
  • 0.1.5                                ...           7 months ago
  • 0.1.4                                ...           7 months ago
  • 0.1.3                                ...           8 months ago
  • 0.1.2                                ...           8 months ago
  • 0.1.1                                ...           9 months ago
  • 0.1.0                                ...           9 months ago
  • 0.0.8                                ...           9 months ago
  • 0.0.7                                ...           10 months ago
  • 0.0.6                                ...           10 months ago
  • 0.0.5                                ...           10 months ago
  • 0.0.4                                ...           10 months ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
  • 0.0.0                                ...           a year ago

Copyright 2014 - 2016 © taobao.org |