Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9160419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:44:06+00:00 2026-06-17T13:44:06+00:00

This works in iOS 6 and not iOS 5, so I’m assuming it’s a

  • 0

This works in iOS 6 and not iOS 5, so I’m assuming it’s a webkit thing.

I have an image in my www/images folder, so I use the following html:

<img src="images/img.gif" />

However the image appears as the blue square with a question mark (iOS’s image not found image).

How can I get this path to work on both iOS 5 and iOS 6?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:44:07+00:00Added an answer on June 17, 2026 at 1:44 pm

    I’ve noticed the same problem, the same code works fine in a local browser and in iOS6 onwards but doesn’t display an image in iOS4.3, 5.0 or 5.1.

    The solution that worked for me was to use a background image instead and style it with CSS, it also means that you can provide a high-res retina image and scale it for non-retina devices too.

    replace your IMG tag with:

    <div id="myImage" />
    

    In your CSS file :

    #myImage
    {
        background-image:url("../../assets/images/img.gif"); // The relative path from your CSS file to your image
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size:cover;
        width:100px;  // Actual image size is 200px x 200px
        height:100px;
    }
    

    The relative path to images from within a CSS file appears to work ok, but the path must be relative to the css file and not your html file.

    If you want an image to display a 100px by 100px image on a non-retina device, you should create an image that is twice the size (200px x 200px) and let background:cover automatically change to the higher resolution when your app is running on a retina device.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code: [image setImage:[UIImage imageNamed:@some@2x.png]]; and it work on ios 4.3, but
This works on the iPhone BTW (Both running iOS 5.1) My app freezes when
Does this work in > iOS 5? .element { background: url(images/myImage.jpg) 50% 0 no-repeat
I tried to use this code but it doesn't work. http://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html Ld /Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator/Dr Ngoo.app/Dr
This works when I have only one state code as a parameter. How can
I have a video that I play. To use full screen in iOS 3.2
I have an iOS application that has a TestFlight build scheme. In this scheme
I am currently learning to use Audio Queue Services in iOS. For this, I
I'm pretty new to iOS programming and I have this problem. I have a
I have an app I am building in iOS, version 5. This app is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.