{"id":4679,"url":"https://github.com/xcarpentier/react-native-safe-image","last_synced_at":"2025-10-16T12:20:33.391Z","repository":{"id":33795521,"uuid":"162608838","full_name":"xcarpentier/react-native-safe-image","owner":"xcarpentier","description":"Really light React-Native package to handle fallback when image is on error","archived":false,"fork":false,"pushed_at":"2023-01-04T01:14:16.000Z","size":828,"stargazers_count":28,"open_issues_count":13,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T16:46:46.272Z","etag":null,"topics":["image","react-native","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xcarpentier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"xcarpentier","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-12-20T17:07:50.000Z","updated_at":"2024-05-22T23:44:43.000Z","dependencies_parsed_at":"2023-01-15T02:36:57.867Z","dependency_job_id":null,"html_url":"https://github.com/xcarpentier/react-native-safe-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcarpentier%2Freact-native-safe-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcarpentier%2Freact-native-safe-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcarpentier%2Freact-native-safe-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcarpentier%2Freact-native-safe-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xcarpentier","download_url":"https://codeload.github.com/xcarpentier/react-native-safe-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252768988,"owners_count":21801373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image","react-native","typescript"],"created_at":"2024-01-05T20:17:19.992Z","updated_at":"2025-10-16T12:20:28.356Z","avatar_url":"https://github.com/xcarpentier.png","language":"TypeScript","funding_links":["https://github.com/sponsors/xcarpentier"],"categories":["Components"],"sub_categories":["Media"],"readme":"[![NPM version](https://badge.fury.io/js/react-native-safe-image.svg)](http://badge.fury.io/js/react-native-safe-image)\n\n# react-native-safe-image\n\nReally light React-Native package to handle fallback when image is on error\n\n- fallback to **other image**\n- fallback to **a component**\n\n## How to use it ?\n`yarn add react-native-safe-image`\n\n```jsx\nimport { SafeImage } from 'react-native-safe-image'\n\n// ...\nrender() {\n  return (\n    \u003cSafeImage\n      source={{ uri: 'http://Normal-Image-Maybe-OnError.jpg' }}\n      fallbackImageSource={require('./Path-To/FallbackImage.jpg')}\n      style={{ width: 30, height: 30 }}\n      resizeMode=\"contain\"\n    /\u003e\n  )\n}\n// ... or ...\nconst noImg = \u003cView\u003e\u003cText\u003eNo Img\u003c/Text\u003e\u003c/View\u003e\nrender() {\n  return (\n    \u003cSafeImage\n      source={{ uri: 'http://Normal-Image-Maybe-OnError.jpg' }}\n      fallbackComponent={noImg}\n      style={{ width: 30, height: 30 }}\n      resizeMode=\"contain\"\n    /\u003e\n  )\n}\n\n```\n\n## Todos\n\n- [x] add `fallbackComponent` prop\n\n## Hire an expert!\nLooking for a ReactNative freelance expert with more than 12 years experience? Contact me from my [website](https://xaviercarpentier.com)!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcarpentier%2Freact-native-safe-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcarpentier%2Freact-native-safe-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcarpentier%2Freact-native-safe-image/lists"}