KSumpy
KSumpy

Reputation: 217

Ionic splash screen (error: unable to read uploaded image)

I am trying to use the ionic resources --splash command, I have a splash.png file saved in my resources folder as well as in the root of my ios and android folders, and it is 2208 x 2208 which is the advised size. But when I run the command I get the following error

"Invalid upload: unable to read uploaded image"

I have added the splash screen preference in my config.xml. Is there more conditions that they didn't specify?

Upvotes: 8

Views: 4037

Answers (5)

Tejas K
Tejas K

Reputation: 700

Here is what I was doing wrong:

1 - Renaming a .jpg to .png and hope it works, it didn't. You need to use a .png image.

2 - Using an image with incorrect resolution, most articles mention that it has to be 2208*2208, I kept getting errors for an incorrectly sized image. Using a 2732 * 2732 resolution image worked like a charm.

Upvotes: 0

jonilyn2730
jonilyn2730

Reputation: 475

I had it working in Windows 7 by storing the icon and splash files as psd.

Upvotes: 0

athanzhang
athanzhang

Reputation: 122

Do not try to save your original jpeg image into png by changing the name of it. You have to use png image. For instance, I save my jpeg images into the ionic folder, and change the type of the jpeg file by changing .jepg to .png. However, it doesn't make a real png image. You have to use software to do the type transferring or download the png image.

Upvotes: 4

Matthew Webb
Matthew Webb

Reputation: 420

I got the same error when uploading an interlaced .png.

However after re-exporting with interlacing turned off ionic accepted the file fine.

Upvotes: 17

KSumpy
KSumpy

Reputation: 217

I just realized that the image I had was actually an Adobe Illustrator image. All I had to do was rename the image from .png to .ai and it worked!

For those wondering here is a quick explanation on the difference between the two:

.ai - Adobe Illustrator vector files are scalable both down and up.

.png - pixel files can be scaled down, not up.

Upvotes: 5

Related Questions