7

This is related to Default-Portrait.png for iPad: any way to make the file size smaller?

Is there any way to specify a more efficient file format (like JPEG) for Default-Landscape.png and Default-Portrait.png?

Community
  • 1
  • 1
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421
  • Not that it directly solved the problem, but have you ran the pngs through imageoptim http://imageoptim.com – Rexeisen May 14 '12 at 21:58
  • Anyway, JPEG are not designed (I believe) for that purpose. Jpeg is lossy because it is designed for pictures taken from a camera, which doesn't require much color quality. Unless you use an image from your camera as an icon, png suits better – paul May 14 '12 at 22:16
  • possible duplicate of [Default-Portrait.png for iPad: any way to make the file size smaller?](http://stackoverflow.com/questions/4580477/default-portrait-png-for-ipad-any-way-to-make-the-file-size-smaller) – Caleb May 20 '12 at 13:14
  • @Caleb I already mentioned that in the question. As you can see, I'm NOT trying to reduce the PNG, unlike that question. – Dan Rosenstark May 20 '12 at 23:27

3 Answers3

6

Yes it's possible to use jpg files as launch images. Just add "Launch image" key with the base filename (e.g. LaunchImage.jpg") to the Info.plist. Then add files to your project such as

  • LaunchImage.jpg
  • LaunchImage@2x.jpg
  • LaunchImage-568h@2x.jpg

and Xcode will pick them up.

However through personal experience I've discovered if you're supporting the larger iPhone 5 screen the App Store expects PNG format and uses the presence of PNG to determine iPhone 5 support and display of iPhone 5 size thumbnails on the store. Using JPG images will not show the app as iPhone 5 optimized in the app store (even though it will work fine on the device) so it is best to stick with PNG.

martinjbaker
  • 1,424
  • 15
  • 23
  • Anyone knows if this "iPhone 5 only with PNG" for the App Store still applies? – StuFF mc Feb 23 '14 at 22:28
  • 1
    How to "add Launch image key with the base filename (e.g. LaunchImage.jpg") to the Info.plist.".Can you show the detail steps in the Xcode? – welkinwalker Apr 14 '14 at 03:23
5

There is no way to use an image other than a png.

All launch images must be PNG files and must reside in the top level of your app’s bundle directory. Section: App Launch (Default) Images


Update: JPEG images to work and Apple's documentation no longer specifies that the images must be PNG files.

Fabian
  • 6,973
  • 2
  • 26
  • 27
  • Fabian without you addressing me (@yar) I wouldn't know that this was updated. – Dan Rosenstark Jan 14 '13 at 05:36
  • 1
    It's funny how it works though, I can see the documentation saying it must be PNGs, but I followed the advice of http://stackoverflow.com/questions/7517508/ios-launch-images-file-type and the jpg splash works on iOS6, saving about 1MB of file size for my image. – Grzegorz Adam Hankiewicz Mar 08 '13 at 18:13
  • Obsolete quote. Updated link: https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ExpectedAppBehaviors/ExpectedAppBehaviors.html – Cœur Sep 01 '15 at 03:37
  • XCode 7.3.1 doesn't accept jpg with launch images, this is the warning it displays "The launch image set "LaunchImage" references a file "launch-ipadx2-portrait.jpg", but that file does not have a valid extension." the same warning applies to all other device variants, the jpg does not display at launch. – ALTN Aug 10 '16 at 12:42
4

If you use xcassets, then since Xcode 6 you can use JPGs. However Xcode will still not let you drop JPGs into the LaunchImage folder. But you can do it in Finder. Simply drop your PNGs into that folder with Finder and then edit the JSON file changing all .png extensions to .jpg.

I haven't submitted an app to the store using this yet, but it works in the iPhone simulator at least.

Update: Doesn’t work on the device. I’ll leave this answer here anyway so people know that this technique was at least tried so the effort won’t be repeated.

mxcl
  • 26,392
  • 12
  • 99
  • 98