{"_id":"@brandingbrand/react-native-fast-image","_rev":"285-d5046c659eac8ba9f70423d566a58c62","name":"@brandingbrand/react-native-fast-image","dist-tags":{"latest":"5.1.3"},"versions":{"5.1.2":{"name":"@brandingbrand/react-native-fast-image","version":"5.1.2","keywords":["cache","cached","fastimage","image","priority"],"author":{"url":"https://dylanvann.com","name":"Dylan Vann","email":"dylan@dylanvann.com"},"license":"(MIT AND Apache-2.0)","_id":"@brandingbrand/react-native-fast-image@5.1.2","maintainers":[{"name":"bbkohsinchu","email":"kohsin.chu@brandingbrand.com"},{"name":"miraestilbb","email":"mira.estil@brandingbrand.com"},{"name":"michaelabelebb","email":"michael.abele@brandingbrand.com"},{"name":"lamine.sadoun","email":"lamine.sadoun@brandingbrand.com"},{"name":"josh.carvin","email":"josh.carvin@brandingbrand.com"},{"name":"mauriciopf","email":"mauricio.perez@brandingbrand.com"},{"name":"sdenaci","email":"sarah.denaci@brandingbrand.com"},{"name":"maksymdeminbbc","email":"maksym.demin@brandingbrand.com"},{"name":"jon.ploucha","email":"jon.ploucha@brandingbrand.com"},{"name":"nathan-sankbeil","email":"nathan.sankbeil@brandingbrand.com"},{"name":"mitchmartinbb","email":"mitch.martin@brandingbrand.com"},{"name":"alexclinebb","email":"alex.cline@brandingbrand.com"},{"name":"danielclayton","email":"daniel.clayton@brandingbrand.com"},{"name":"markignaczakbb","email":"mark.ignaczak@brandingbrand.com"},{"name":"doubs","email":"david.dwornick@brandingbrand.com"},{"name":"davechekan","email":"dave@brandingbrand.com"},{"name":"branderbrett","email":"brett@brandingbrand.com"},{"name":"skyeckstrom","email":"npm@skyeckstrom.com"},{"name":"sdovenor","email":"sebastian@brandingbrand.com"},{"name":"nickburkhartbb","email":"nick.burkhart@brandingbrand.com"},{"name":"bbtravis","email":"travis+bbtravis@brandingbrand.com"},{"name":"vance.hu","email":"vance.hu@brandingbrand.com"},{"name":"jackwork","email":"John.Workmeister@brandingbrand.com"},{"name":"deemaabdallah","email":"deema.abdallah@brandingbrand.com"},{"name":"msiauko","email":"mikhail@brandingbrand.com"},{"name":"justinkendler","email":"justin@justinendler.com"},{"name":"tuckerbrander","email":"tucker@brandingbrand.com"},{"name":"jasonmosleybb","email":"jason.mosley@brandingbrand.com"},{"name":"dshadrick","email":"dan.shadrick@brandingbrand.com"},{"name":"jonkoynok","email":"jon.koynok@brandingbrand.com"},{"name":"nickbb","email":"nick@brandingbrand.com"},{"name":"notajvento","email":"aj@brandingbrand.com"},{"name":"pavlemilicevicbb","email":"pavle.milicevic@brandingbrand.com"},{"name":"cauldrath","email":"ben@brandingbrand.com"},{"name":"andyschwob","email":"andy.schwob@brandingbrand.com"},{"name":"brad.habenicht","email":"brad.habenicht@brandingbrand.com"}],"homepage":"https://github.com/DylanVann/react-native-fast-image#readme","bugs":{"url":"https://github.com/DylanVann/react-native-fast-image/issues"},"dist":{"shasum":"92531c408cef8e8055f63657fcd7c192c285c0e0","tarball":"https://registry.npmjs.org/@brandingbrand/react-native-fast-image/-/react-native-fast-image-5.1.2.tgz","fileCount":364,"integrity":"sha512-EkP6FT+z3VdWaCd5pASeKVS0XOSqBRuqEepzZkZ91RxrpvNW8EJK8fVhAV85tBrWsKAemu/fBM6NqtOpBi11+g==","signatures":[{"sig":"MEUCIG2RBOay5PotS/WQyFdsruOUCv+qHY0FqxCrXAJzmbPMAiEA7Xj2s7I0yCO8Gn7WHpBEOCp58jVPJvoaWwGAk/7OfiI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4446965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAFMSCRA9TVsSAnZWagAA9p8P/3MMgNdrNJfLzmKJ50MY\nlijBHIzK/fM2lCyOn7zwOCNk9zW84x5DKm88TUsm0yW8S8qq39Lxdg4LgoAD\nuWVZ6NMsZO0SOSdzQ+AomfwiAjfQrTtqyyK95QLMmwvx5YLmrZSnpHmmawrp\nyqouhQwBzlVSfqcNsQ89yYbfDEqvv9o/gtxTLQVdticy0RkMEygBJ82TChgs\ncSvb5v9lplfpRG0DyQ5hejUNM4f7Hwpf6f8jT+NmNw369Mjcz1F/nVXdFwhR\nUzk+MTMJL+0z3qApPb8U0hC2t74DgzUGhjkZjKPxkuPu+YQMN6TuLf2UFvP9\nmaiIH9LGNX4cdUu7qN7r6Yl4SmUBaee1sJJs9HD5LvbFdo+MZsE7MhxRlIZN\nKOryf922d72TAWNp4bUq33jYWZPHFJ1i8VAS/fdN/PkSfNRtF0DSLkpupE/B\n8d3RduIDrG4D1q+UqAbayP7ZxcxoZCrplEhbwgKKwKqZ6/XrfU1t1rOxIvcu\ng+GB3FKnVRhR8NEcGCyOQqEsVu17ETKYjC78UODOrjMnAS1CQW8x952BfF0N\n57RNkJRV876W7/e9J8vSlF8/Angg4y7aoTRSL5L+bAKB5j5gPMhISb65OdKf\novZyu60AodmjxCNdHS6oDpMpHUGmGk4wqMpBy6b0nkH3DeVQTovzH6ZyK8pl\nr6o0\r\n=KqKt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","types":"src/index.d.ts","gitHead":"04d9e04049bd0bb684a72e55dca587acd46f5270","scripts":{"test":"yarn run format && yarn run test:jest","format":"prettier --write --list-different ./src/*.js","prepare":"git submodule update --init --recursive","test:jest":"jest ./src/*.js"},"_npmUser":{"name":"jasonmosleybb","email":"jason.mosley@brandingbrand.com"},"repository":{"url":"git+https://github.com/DylanVann/react-native-fast-image.git","type":"git"},"_npmVersion":"5.6.0","description":"🚩 FastImage, performant React Native image component.","directories":{},"_nodeVersion":"8.11.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","react":"16.6.0-alpha.8af6728","prettier":"^1.15.2","babel-jest":"^23.6.0","prop-types":"^15.6.2","@babel/core":"^7.1.6","react-native":"^0.57.4","prettier-check":"^2.0.0","react-test-renderer":"16.6.0-alpha.8af6728","metro-react-native-babel-preset":"0.48.1"},"peerDependencies":{"react":"*","prop-types":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-fast-image_5.1.2_1543525137436_0.011791645709126719","host":"s3://npm-registry-packages"}},"5.1.3":{"name":"@brandingbrand/react-native-fast-image","version":"5.1.3","keywords":["cache","cached","fastimage","image","priority"],"author":{"url":"https://dylanvann.com","name":"Dylan Vann","email":"dylan@dylanvann.com"},"license":"(MIT AND Apache-2.0)","_id":"@brandingbrand/react-native-fast-image@5.1.3","maintainers":[{"name":"andyschwob","email":"andy.schwob@brandingbrand.com"},{"name":"bbkohsinchu","email":"kohsin.chu@brandingbrand.com"},{"name":"bbtravis","email":"travis+bbtravis@brandingbrand.com"},{"name":"bccda77db","email":"joe.pasqualetti@brandingbrand.com"},{"name":"brad.habenicht","email":"brad.habenicht@brandingbrand.com"},{"name":"branderbrett","email":"brett@brandingbrand.com"},{"name":"bubbasdad","email":"david.rhodes@brandingbrand.com"},{"name":"cauldrath","email":"ben@brandingbrand.com"},{"name":"danielclayton","email":"daniel.clayton@brandingbrand.com"},{"name":"davechekan","email":"dave@brandingbrand.com"},{"name":"deemaabdallah","email":"deema.abdallah@brandingbrand.com"},{"name":"doubs","email":"david.dwornick@brandingbrand.com"},{"name":"dshadrick","email":"dan.shadrick@brandingbrand.com"},{"name":"jackwork","email":"John.Workmeister@brandingbrand.com"},{"name":"jasonmosleybb","email":"jason.mosley@brandingbrand.com"},{"name":"jon.ploucha","email":"jon.ploucha@brandingbrand.com"},{"name":"jonkoynok","email":"jon.koynok@brandingbrand.com"},{"name":"josh.carvin","email":"josh.carvin@brandingbrand.com"},{"name":"justinkendler","email":"justin@justinendler.com"},{"name":"lamine.sadoun","email":"lamine.sadoun@brandingbrand.com"},{"name":"maksymdeminbbc","email":"maksym.demin@brandingbrand.com"},{"name":"markignaczakbb","email":"mark.ignaczak@brandingbrand.com"},{"name":"mauriciopf","email":"mauricio.perez@brandingbrand.com"},{"name":"michaelabelebb","email":"michael.abele@brandingbrand.com"},{"name":"miraestilbb","email":"mira.estil@brandingbrand.com"},{"name":"mitchmartinbb","email":"mitch.martin@brandingbrand.com"},{"name":"msiauko","email":"mikhail@brandingbrand.com"},{"name":"nathan-sankbeil","email":"nathan.sankbeil@brandingbrand.com"},{"name":"nickbb","email":"nick@brandingbrand.com"},{"name":"nickburkhartbb","email":"nick.burkhart@brandingbrand.com"},{"name":"notajvento","email":"aj@brandingbrand.com"},{"name":"pavlemilicevicbb","email":"pavle.milicevic@brandingbrand.com"},{"name":"sdenaci","email":"sarah.denaci@brandingbrand.com"},{"name":"sdovenor","email":"sebastian@brandingbrand.com"},{"name":"skyeckstrom","email":"npm@skyeckstrom.com"},{"name":"tuckerbrander","email":"tucker@brandingbrand.com"},{"name":"vance.hu","email":"vance.hu@brandingbrand.com"}],"homepage":"https://github.com/DylanVann/react-native-fast-image#readme","bugs":{"url":"https://github.com/DylanVann/react-native-fast-image/issues"},"dist":{"shasum":"de4fc95b3595d7808a3c9394f2694dede7996c00","tarball":"https://registry.npmjs.org/@brandingbrand/react-native-fast-image/-/react-native-fast-image-5.1.3.tgz","fileCount":364,"integrity":"sha512-TOM5ZXAbwRwtR+cV76rB7uZreYykG6HEWUIP4Kx9a4b2jvlww+L2RT8U/nBe5ElEH1PNgCv73J1ZrX6HIPtEhg==","signatures":[{"sig":"MEUCIBNiUuK9uoxk33fJTVZnJOH0GGoDW/QkcQ0ck7fEtosuAiEAzBj1IIRSOXfLqBC3cOagx4rbi81k5wlxgtnmC9mTvmw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4446923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcETSCCRA9TVsSAnZWagAA0eAQAKGPsZ3vK+R3PjiCCe1T\nnTR/+Sq7yon51d4vYB4XIvqgKDop3b2bn7Ux+UtGBAo/lgt7uTbBwh2UKfBc\naTKMoJzWQWVKv2kuZIM++um6ycEqySH2hi4g2C12f11YmFHsAy//iOScU+83\nLhe/+TVdEDmFw/ZgmtxfIRJkMFvCba1/ecX7dx0gHVqnv5v7VgDxvkay7goU\n3O3ZEQV6pOtt0DB4r1lMn/7Prf1LhT2kFQXliLkUvBc62ZnoDncwXwU4jDGn\nq5qKh2X6zASWvbGozuJLE5+f2ZhmDwzByDDEJQ31uvPvf/XlGbPIZW1yp4sc\nWKXqFD0PHM/FXDwW4Dbgf9xl/AsUJZSR7tU4ZhwRz6LFynZkO/n8GxjGQTOF\ndzODZjwAkfNXmYdwb+FOzzJcBE5KrE6GvrAA8i5DrLjIZSpoaa85UmHkTerp\nG7nVJ8BZKZ9Xryek+8J+u6Wg4RUh2iFCn5zkDNlGLT3VvkIDpVeosjxOdfmY\n20xcb2oBLfXOeA9cpuiHtoYhpcK3FpdhJH/ugCpPn6MX7zlD2Bn1Tu30SDVR\nKXFtnmBKm7lab8R5p0VD+JVNCJipjbqOgZpCjtukX8XDhWUhg/NLS0bt7vCR\nL75COVGAFP84IWCfH03y2FqZ+S0MMpsQjh5SUpAiNRIa5Sgt672vGTM7ZzFt\nXaL7\r\n=xvdS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","types":"src/index.d.ts","gitHead":"74cffec2fb94083326e56164c7743bbe520f33b6","scripts":{"test":"yarn run format && yarn run test:jest","format":"prettier --write --list-different ./src/*.js","prepare":"git submodule update --init --recursive","test:jest":"jest ./src/*.js"},"_npmUser":{"name":"jasonmosleybb","email":"jason.mosley@brandingbrand.com"},"repository":{"url":"git+https://github.com/DylanVann/react-native-fast-image.git","type":"git"},"_npmVersion":"5.6.0","description":"🚩 FastImage, performant React Native image component.","directories":{},"_nodeVersion":"8.11.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","react":"16.6.0-alpha.8af6728","prettier":"^1.15.2","babel-jest":"^23.6.0","prop-types":"^15.6.2","@babel/core":"^7.1.6","react-native":"^0.57.4","prettier-check":"^2.0.0","react-test-renderer":"16.6.0-alpha.8af6728","metro-react-native-babel-preset":"0.48.1"},"peerDependencies":{"react":"*","prop-types":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-fast-image_5.1.3_1544631425687_0.9498809236663848","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-11-29T20:58:57.436Z","modified":"2026-03-13T16:21:26.263Z","5.1.2":"2018-11-29T20:58:57.647Z","5.1.3":"2018-12-12T16:17:05.892Z"},"bugs":{"url":"https://github.com/DylanVann/react-native-fast-image/issues"},"author":{"url":"https://dylanvann.com","name":"Dylan Vann","email":"dylan@dylanvann.com"},"license":"(MIT AND Apache-2.0)","homepage":"https://github.com/DylanVann/react-native-fast-image#readme","keywords":["cache","cached","fastimage","image","priority"],"repository":{"url":"git+https://github.com/DylanVann/react-native-fast-image.git","type":"git"},"description":"🚩 FastImage, performant React Native image component.","maintainers":[{"email":"nathan.sankbeil@brandingbrand.com","name":"nathan-sankbeil"},{"email":"nick.burkhart@brandingbrand.com","name":"nickburkhartbb"},{"email":"travis+bbtravis@brandingbrand.com","name":"bbtravis"},{"email":"deema.abdallah@brandingbrand.com","name":"deemaabdallah"},{"email":"mikhail@brandingbrand.com","name":"msiauko"},{"email":"jason.mosley@brandingbrand.com","name":"jasonmosleybb"},{"email":"nick@brandingbrand.com","name":"nickbb"},{"email":"aj@brandingbrand.com","name":"notajvento"},{"email":"andrew.harrison@brandingbrand.com","name":"xero"},{"email":"stefan.neamtu@brandingbrand.com","name":"varzamanbb"},{"email":"ops@brandingbrand.com","name":"bb_jenkins"},{"email":"crherman7@gmail.com","name":"crherman7"},{"email":"johnmichael.w.riley@gmail.com","name":"jmwr"},{"email":"travis@brandingbrand.com","name":"bbtravisreadonly"}],"readme":"<h1 align=\"center\">\n  🚩 FastImage\n</h1>\n\n<p align=\"center\">\n  Performant React Native image component.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/react-native-fast-image\">\n    <img src=\"https://img.shields.io/npm/v/react-native-fast-image.svg?style=flat-square\" alt=\"npm package\">\n  </a>\n  <a href=\"https://www.npmjs.com/package/react-native-fast-image\">\n    <img src=\"https://img.shields.io/npm/dm/react-native-fast-image.svg?style=flat-square\" alt=\"npm downloads\">\n  </a>\n  <a href=\"https://circleci.com/gh/DylanVann/react-native-fast-image/tree/master\">\n    <img src=\"https://img.shields.io/circleci/project/github/DylanVann/react-native-fast-image/master.svg?style=flat-square\" alt=\"CircleCI build status\">\n  </a>\n  <a href=\"https://github.com/DylanVann/react-native-fast-image/blob/master/LICENSE\">\n    <img src=\"https://img.shields.io/github/license/DylanVann/react-native-fast-image.svg?style=flat-square\" alt=\"license\">\n  </a>\n</p>\n\n<p align=\"center\" >\n  <kbd>\n    <img src=\"https://github.com/DylanVann/react-native-fast-image/raw/master/docs/assets/scroll.gif\" title=\"Scroll Demo\" float=\"left\">\n  </kbd>\n  <kbd>\n    <img src=\"https://github.com/DylanVann/react-native-fast-image/raw/master/docs/assets/priority.gif\" title=\"Priority Demo\" float=\"left\">\n  </kbd>\n  <br>\n  <em>FastImage example app.</em>\n</p>\n\nReact Native's `Image` component handles image caching like browsers\nfor the most part.\nIf the server is returning proper cache control\nheaders for images you'll generally get the sort of built in\ncaching behavior you'd have in a browser.\nEven so many people have noticed:\n\n- Flickering.\n- Cache misses.\n- Low performance loading from cache.\n- Low performance in general.\n\n`FastImage` is an `Image` replacement that solves these issues.\n`FastImage` is a wrapper around\n[SDWebImage (iOS)](https://github.com/rs/SDWebImage)\nand\n[Glide (Android)](https://github.com/bumptech/glide).\n\n## Features\n\n- [x] Aggressively cache images.\n- [x] Add authorization headers.\n- [x] Prioritize images.\n- [x] Preload images.\n- [x] GIF support.\n- [x] Border radius.\n\n## Usage\n\n```bash\n# Install\nyarn add react-native-fast-image\n\n# Automatic linking. (other linking methods listed below)\nreact-native link react-native-fast-image\n```\n\n```jsx\nimport FastImage from 'react-native-fast-image'\n\nconst YourImage = () =>\n  <FastImage\n    style={styles.image}\n    source={{\n      uri: 'https://unsplash.it/400/400?image=1',\n      headers:{ Authorization: 'someAuthToken' },\n      priority: FastImage.priority.normal,\n    }}\n    resizeMode={FastImage.resizeMode.contain}\n  />\n```\n\n## Other Linking Methods\n\n- [Manual](docs/installation-manual.md) (might be needed if something went wrong with `react-native link`)\n- [CocoaPods (iOS)](docs/installation-cocoapods.md) (you may wish to use this if you are already using CocoaPods)\n- [Are you using Glide already using an AppGlideModule?](docs/app-glide-module.md) (you might have problems if you don't read this)\n\n## Proguard\n\nIf you use Proguard you will need to add these lines to `android/app/proguard-rules.pro`:\n\n```\n-keep public class com.dylanvann.fastimage.* {*;}\n-keep public class com.dylanvann.fastimage.** {*;}\n```\n\n## Properties\n\n### `source?: object`\n\nSource for the remote image to load.\n\n---\n\n### `source.uri?: string`\n\nRemote url to load the image from. e.g. `'https://facebook.github.io/react/img/logo_og.png'`.\n\n---\n\n### `source.headers?: object`\n\nHeaders to load the image with. e.g. `{ Authorization: 'someAuthToken' }`.\n\n---\n\n### `source.priority?: enum`\n\n- `FastImage.priority.low` - Low Priority.\n- `FastImage.priority.normal` **(Default)** - Normal Priority.\n- `FastImage.priority.high` - High Priority.\n\n---\n\n### `source.cache?: enum`\n\n- `FastImage.cacheControl.immutable` - **(Default)** - Only updates if url changes.\n- `FastImage.cacheControl.web` - Use headers and follow normal caching procedures.\n- `FastImage.cacheControl.cacheOnly` - Only show images from cache, do not make any network requests.\n\n---\n\n### `resizeMode?: enum`\n\n- `FastImage.resizeMode.contain` - Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).\n- `FastImage.resizeMode.cover` **(Default)** - Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).\n- `FastImage.resizeMode.stretch` - Scale width and height independently, This may change the aspect ratio of the src.\n- `FastImage.resizeMode.center` - Do not scale the image, keep centered.\n\n---\n\n### `onLoadStart?: () => void`\n\nCalled when the image starts to load.\n\n---\n\n### `onProgress?: (event) => void`\n\nCalled when the image is loading.\n\ne.g. `onProgress={e => console.log(e.nativeEvent.loaded / e.nativeEvent.total)}`\n\n---\n\n### `onLoad?: (event) => void`\n\nCalled on a successful image fetch. Called with the width and height of the loaded image.\n\ne.g. `onLoad={e => console.log(e.nativeEvent.width, e.nativeEvent.height)}`\n\n---\n\n### `onError?: () => void`\n\nCalled on an image fetching error.\n\n---\n\n### `onLoadEnd?: () => void`\n\nCalled when the image finishes loading, whether it was successful or an error.\n\n---\n\n### `style`\n\nA React Native style. Supports using `borderRadius`.\n\n---\n\n### `fallback: boolean`\n\nIf true will fallback to using `Image`.\nIn this case the image will still be styled and laid out the same way as `FastImage`.\n\n## Static Methods\n\n### `FastImage.preload: (source[]) => void`\n\nPreload images to display later. e.g.\n\n```js\nFastImage.preload([\n  {\n    uri: 'https://facebook.github.io/react/img/logo_og.png',\n    headers: { Authorization: 'someAuthToken' },\n  },\n  {\n    uri: 'https://facebook.github.io/react/img/logo_og.png',\n    headers: { Authorization: 'someAuthToken' },\n  },\n])\n```\n\n## Troubleshooting\n\nIf you have any problems using this library try the steps in [troubleshooting](docs/troubleshooting.md) and see if they fix it.\n\n## Development\n\n[Follow these instructions to get the example app running.](docs/development.md)\n\n## Supported React Native Versions\n\nThis project only aims to support the latest version of React Native.\\\nThis simplifies the development and the testing of the project.\n\nIf you require new features or bug fixes for older versions you can fork this project.\n\n## Credits\n\nThe idea for this modules came from\n[vovkasm's](https://github.com/vovkasm)\n[react-native-web-image](https://github.com/vovkasm/react-native-web-image)\npackage.\nIt also uses Glide and SDWebImage, but didn't have some features I needed (priority, headers).\n\n## Licenses\n\n* FastImage - `MIT`\n* SDWebImage - `MIT`\n* Glide - `Apache-2.0`\n","readmeFilename":"README.md"}