Web page cannot display some images - image

My host uses Apache with .htaccess.
The web page is PHP-based.
The PHP files load just fine. The images are an issue.
A few are OK but most are not. They are all in a folder /jpg off the root.
Some are png others jpg.
All the images are like this:
<p class="Regular" align="center"><img class="img-responsive" max-width="90%" height="auto" src="/jpg/topimage.jpg" ><br/><br/>
If I replace topimage.jpg with say image20.jpg, even though image20.jpg is in the jpg folder, it does not display.
I thought, maybe this is due somehow to caching? (not sure why). I try with Chrome, Firefox and Opera.
My computer runs Windows 10.
On Android it is even worse. Only one image appears.
An almost identical web page is available from another URL and the images there (the same ones) display just fine.
The properties of the folders in .htaccess seem OK.
Where would I look next?
I replaced a one of the png image files with a similarly named jpg. So \jpg\image2.png is now \jpg\image2.jpg. Here's the img html:
<img class="img-responsive" max-width="40%" height="auto" src="/jpg/image2.jpg">
And image2.jpg is in the /jpg folder off the root.
If I edit (on Apache) the php file and change image2 to image1, image1 appears. Back to image2.jpg and again the placeholder.
I'm not sure what to do next.

Related

Website displays image that is not associated with img src

I have an iOS app that contains a UIWebView, which display a webpage. Sometimes the page displays a different image than the one associated with the src link.
A user sent me a screenshot where it was clear that one of the icon images had been replaced with a completely different image. The same wrong image was displayed in each of the instances where this icon was supposed to be displayed. Refreshing did not solve the issue, but closing and opening the app did. (Or maybe she actually deleted and reinstalled the app.)
The html for the icon is just an img:
<img src = "/the_icon_source">
The img src is hardcoded directly into the HTML file. I therefore don't see that the HTML itself could have been wrong or said anything besides "/the_icon_source".
So how can the wrong image be associated with an image src? Could the server be sending the wrong image when it's asked for "/the_icon_source"? Could the iOS app be caching incorrectly, mixing up images? How to test and fix?
I myself cannot reproduce this issue. I'm not sure how often it occurs, but several users have mentioned it, also for other images on the page. They have only mentioned it occurring in the app, not on the website. This may just be because the app is used more than the website.
My host is Webfaction and the images are served using WebFaction server’s static-only front-end nginx process. The app displays the website in a UIWebView. (Webfaction suppprt merely told me that they served the right images.)
Is the problem not that you have it like this:
img src = "/the_icon_source"
rather than like this:
img src = ".the_icon_source"
If this is sat on a linux server the / will be pointing to the root directory whereas the . or simply the_icon_source would simply point to the directory in which the website is sat which i assume is where the image is also located.

What would be the reasons why some jpg images would load in an app while some others would not?

I made an app in jsp pages. The images path is stored in web.xml.
Most of the product images are loading perfectly fine except for some little troublemakers that won't do their job. What could be the reasons why? Any idea?
The extensions
I have checked the extension files which is jpg for everybody...
The images name
I have triple checked all the pictures name to make sure everything matches but it seems that it's the same pictures that wont load over and over again.
The path
The path is same for all images: <img class="img" alt="" src="${initParam.productImagePath}${product.name}.jpg" />

images not loading in Internet Explorer. why?

ive been finally polishing off a website i was building but to my dismay i recently checked the website in Internet Explorer and found the images weren't loading fully.. you can see can the borders for the image but nothing loads in between. i thought it might something i altered on wordpress, but the main page has images from from non wordpress html files and they don't load either.. everything works fine on every other browser except Internet Explorer.. any ideas why? probably a simple fix
here's the website.. . all the code and css is viewable there, if you want my wordpress code let me know
maybe the code just needs to rearranged to make window browsers happy?
any help would be great
Looking at the source for the shop.html, it looks like you are specifying the height of the images, but not the width. Opera, and Firefox are ignoring the width="" and using the default width, but IE is setting it to width="1." I don't know how to change this in Wordpress but if you remove the width="" or add a value it will show correct.
You can see this if you r-click the image line in IE and select properties: it shows as 1X290px.
img src="images/shop/julianduron.jpg" width="" height="290"
hope this helps

Image not showing IE(all the versions)

i tried all the versions of ie but it is not showing only 1 image.
<asp:Image ID="img" runat="server" ImageUrl="~/images/FlorDecor.jpg" BorderColor="AliceBlue" BorderStyle="None" Height="126px" Width="90px" />
i tried placing this image outside the folder and giving
url = "FlorDecor.jpg"
url = "../FlorDecor.jpg"
url="~/FlorDecor.jpg"
i tried all this stuff pls help me..
Your URL references were not all valid in Silverlight (should have been "images/FlorDecor.jpg" if the file is in the images folder of your Silverlight App).
Silverlight uses different URL methods depending on whether the image is in the Silverlight project or somewhere on the source website (or an external site).
If the problem persists the cause is more likely that your JPG is not compatible for some reason.
Convert it to a PNG with Paint.Net or similar to test that theory, or just grab another JPG from the Internet instead.
Do not use .jpg file, use .png. It will works.

Visual Studio 2008 Web Project problem with PNG files

I've added a PNG file to a directory in my VS2k8 webforms project, and when I run the app, it refuses to render my image - it even knows the dimensions but renders a box with a red X.
Oddly enough, if I double click the PNG file within VS2k8, it opens up in the IDE and displays fine (but only within the IDE).
Does anyone have any clues?
The path is correct.. I just have a basic default.aspx page with this in the body
<img src="img/logo.png" />
if i navigate to img/logo.png in the browser, it shows a box with the same dimensions as my image, but a red x. Its finding the image, just not rendering it. It's showing up in IE running under the vs2k8 web server (localhost:5512/default.aspx)
I've dropped a JPG in the same directory, and it shows up just fine.
I'm not sure what type of PNG it is, but here is the kicker.... If i make an HTML file that references that image, copy both this HTML file and PNG file to my webserver (or just double click on the HTML page), it comes up JUST FINE.
Its leading me to believe that the Visual Studio web server may not recognize PNG files (at least this one) properly?
Try changing the path to:
<img src="/img/logo.png" />
Try to use Firebug on the running page. It will let you change the path dynamically so that you can see if there is a problem with the path. Alternatively you can also just copy your dev path, say "http://localhost:<someport>/img/logo.png" and see whether it loads there.
As a third alternative you could use the <asp:Image id="imageLoge" runat="server" ImageUrl="..."/>. The advantage is that it will let you browse in the folders and select your image. In this way you're guaranteed that it is not a problem with your path.

Resources