Reputation: 1994
I am trying to use the automatic method created by Ionic to generate matched sized splash screen sizes to my app.
I am using the next command for it:
ionic cordova resources
Or:
ionic cordova resources --splash
(for more specific command).
Then I receive the next error in the CLI:
✖ Uploading source images to prepare for transformations - failed!
HTTP Error 400: POST https://res.ionic.io/api/v1/upload
{"Error":"unable to read uploaded image","Width":0,"Height":0,"Type":"png","Vector":false}
I have tried to upload either png
and jpg
.
I have also tried to clear the transparency of the png
so it will have background. I have also tried using varies of sizes taken from Apple official website.
But still it does not work.
Maybe something in the image is incorrect?
Btw, Icon just works fine.
Upvotes: 3
Views: 2391
Reputation: 41
Make Sure that the icon size is at least 1024 x 1024px and the splash screen size is at least 2732 x 2732px.
Upvotes: 0
Reputation: 51
I had this problem the other day, and I found a solution
https://github.com/ionic-team/ionic-cli/issues/3385#issuecomment-408508772
First, add the Android platform:
ionic cordova platform add android
Get ready icon.png
and splash.png
in resources
Run
npm i -g [email protected]
Then ionic cordova resources android
Upvotes: 2
Reputation: 357
Save files as icon.psd and splash.psd (Photoshop format) with Gimp.
Upvotes: 0
Reputation: 446
Image file needs to be in non-interlaced format. Use ImageMagick or another tool to save it as non-interlaced and retry.
Upvotes: 0
Reputation: 1994
Saving the image through Windows Paint
solved the problem. Now Cordova successfully recognize the image width and height.
Upvotes: 0