All Projects → isair → react-native-smart-assets

isair / react-native-smart-assets

Licence: MIT license
✅ Automatically generate an Images module from your image assets. Converts intelligently (e.g. PDF to @2x, @3x etc).

Programming Languages

shell
77523 projects

react-native-smart-assets

Automatically generate an Images module from your image assets. Converts intelligently (e.g. PDF to @2x, @3x etc).

---Automatically-->

import Images from './Images';

...

<Image source={Images.myIcon} /> // Property name is same as file name. Automatically uses @2x, @3x.

Requirements

  • Mac OS X or Linux.
  • GhostScript is required to convert PDF assets into pre-rendered PNGs for different DPIs. Mac OS X users can use brew install gs.

Usage

./convert-assets.sh /assets_directory /output_directory

A directory named img and a script named Images.js will be added to the output directory. Existing ones will be removed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].