5 Replies Latest reply: Mar 14, 2013 5:13 AM by 991873 RSS

    Images won't always display in a region

    611448
      I have a confusing problem. I have loaded 5 gifs on my local version of APEX and designated them as application only.

      To display an image in a region, I use:
      <img src="#APP_IMAGES#AJ01.GIF">

      That gif displays. If I choose any other gif, I get the "broken image" icon.

      I have tried the same steps on the Hosted site and two of the five gifs work.

      I have also tried #IMAGES_PREFIX# with no application selected and that does help.

      Can you point me in the right direction?
        • 1. Re: Images won't always display in a region
          135285
          Hi,

          your example code doesn't show. You have to use a space between < and img or use some other sign like [ instead.

          About your problem. Use
          &lt;img src="#APP_IMAGES#yourimage.gif">
          if you uploaded the file to Shared Components\Images and assigned it to your application. <b>Note:</b> Check that you really assigned it to the correct application.

          Or use
          &lt;img src="#WORKSPACE_IMAGES#yourimage.gif">
          if you uploaded it into Shared Components\Images but didn't assign it to an application.

          #IMAGES_PREFIX# is just used if you copy it into the APEX <b>images</b> directory onto the web-server. But you shouldn't do that, you should always put it into your own directory.

          Hope that helps to solve your problem.
          Patrick
          ----------------------------------------------------------------------------------------------------
          My APEX Blog: http://www.inside-oracle-apex.com
          The ApexLib Framework: http://apexlib.sourceforge.net
          The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!
          • 2. Re: Images won't always display in a region
            611448
            Thanks Patrick,

            I had tried:
            < img src="#WORKSPACE_IMAGES#AJ01.GIF">
            which worked, but
            < img src="#WORKSPACE_IMAGES#DWP1.GIF">
            doesn't work.

            yet both AJ01.GIF and DWP1.GIF were uploaded the same way and neither are assigned to an app.

            I also tried
            < img src="#APP_IMAGES#AJ01.GIF"> (and the same for DWP1.GIF)

            and set both attached to an app. But the results were identical.

            When I tried this on the hosted site, I tried #IMAGES_PREFIX#, #APP_IMAGES#, and #WORKSPACE_IMAGES#, and two gifs worked and three didn't, even though I used the same code in the same region, and the files were either assigned to an app or not the same way. (I just replaced the filename.gif part.)


            Any more thoughts?

            Thanks,
            Norman

            Message was edited by:
            user608445

            Message was edited by:
            user608445
            • 3. Re: Images won't always display in a region
              330976
              Norman,

              the name of the image is sensitive. capitals must be capitals, lower-case lower-case. you have to type exactly the name of the image as it is shown in your file-system.

              I had once the same problem.....

              Leo
              • 4. Re: Images won't always display in a region
                611448
                Leo,
                Thank you, thank you, thank you, etc....

                You hit the nail on the head. (I am ashamed to say I even had a file named "dwp1.GIF" so the mix of cases got me which ever way I tried it).

                Although this was HTML, case sensitivity matters within a string - but I get tripped up with the way it sometimes matters in APEX and sometimes doesn't. In this case, I was dealing with a string in quotes.

                Anyway, Once again - Thanks
                Norman
                • 5. Re: Images won't always display in a region
                  991873
                  Hi Patrick

                  Thank you, than you, thank you. I've spent hours crashing about vainly because I didn't know about the "#WORKSPACE_IMAGES# variable.
                  Hope you have a great St Patrick's day!
                  Probleml solved!!!

                  Alan