0

since expo doesn't support gif images as splashscreen, i am trying to use gif as json a file. Is it possible to use json file in app.json. If yes, how? Any help would be appreciated.

1 Answers1

0

Yes, you can place json file in your project and use it by importing from the relative path.

import animation from './animation.json';//if the json file exists in the same folder

In the case your project is typescript based you should add "resolveJsonModule": true into "compilerOptions" in tsconfig.json file.

{
 "compilerOptions": {
  //...
  "resolveJsonModule": true,
  //...
 }
}
Jonas Beck
  • 246
  • 4
  • since expo uses app.json file for splash screen, how can i import json file in app.json, i tried replacing existing png image with json file and applied your changes, still it is giving blank white screen in place of splash screen –  Mar 02 '23 at 05:22