I'm using spring tiles framework to display the screens where I have mentioned spring url for image path by giving like ${baseurl}.
It is working fine in both Mozilla and safari browsers desktop.when I try to access the application by ipad browser(safari)there i'm not able to see my image getting loaded.
Please help me on this.
I highly doubt that the browser affect the way tiles work.
I can imagine that the way you referere to an image url in you jsp is wrong. The recomended way is somethink like that:
<c:url value="/imagefolder/myimage.png" var="imgUrl" />
<img src="${imgUrl}" width="64" height="64" />
Related
I am trying to display image which is inside my webapp/WEB-INF/images folder. And I am using
<c:url value="/images/${product.productId}.png" />
To get the image in JSP. But it is not working. Please help me out with this.
I have successfully deployed my laravel project to shared hosting (cPanel) and all seems to be working apart from the images. The images stored directly on the server e.g. logo.png don't show up and yet css files in the same public directory show up.
When I try to view the image directly via its URL, I still can't access it and gives me an error of "The image "http://..." cannot be displayed because it contains errors.
Could you please advise? Thanks in advance
Updated:
I have tried several alternatives which work locally but not when I upload.
< img src="/img/logo.png" width="100" />
< img src="{{ asset('/img/logo.png') }}" width="100" />
None of the above works and even when I try to access it via http://sub.domain.com/img/logo.png . It gives the error above
It turns out that the problem wasn't with the RewriteRule but rather the ftp client uploading the images with ASCII format. Laravel doesn't seem to pick those images so I re-ftped them with binary format and everything is working fine.
I hope this can help someone else.
I just signed up for a cloudflare account and began forcing everything to https just to see how it worked, and to my surprise, all my images refused to work over https. now this is something I don't understand because the assets are all linked via:
HTML:
<img src="./images/image.jpg" />
CSS:
background-image: url(../images/image.jpg);
So I figured, I would change it up to use absolute urls with // instead of relative paths:
HTML:
<img src="//example.com/images/image.jpg" />
CSS:
background-image: url(//example.com/images/image.jpg);
this did not work either. so I decided to hard link to https:
HTML:
<img src="https://example.com/images/image.jpg" />
CSS:
background-image: url(https://example.com/images/image.jpg);
and again, not working. what happens is the images all buffer and as soon as they are fully downloaded and displayed,they disappear abruptly.
All of the images are available over https or http so I do not understand the issue here. Would appreciate a little insight into this and whether its a cloudflare specific issue or an issue with how I'm writing my code. Can anyone confirm that relative paths should call assets via whatever protocol is currently in use? ive not seen any issue with it in the past.
Thanks in advance
Odd problem.
Would appreciate a little insight into this and whether its a
cloudflare specific issue
In general, there should be no problem to do what you are asking, there's no CloudFlare issue
or an issue with how I'm writing my code.
Both of your code examples look good to me, the first perhaps preferable because it will work with both HTTP and HTTPS
<img src="//example.com/images/image.jpg" />
Have you
ruled out browser issues by testing with another browser?
cleared the CF cache?
tested with CF set to development mode?
ruled out any app related issues by testing https image loading on a plain HTML page?
tried changing the CF SSL Level (Flexible, Full, Strict)?
if still no joy, can you post a URL?
Good luck!
As it turns out this was a Cloud Flare issue. They have a feature called Rocket Loader, which compresses all your js files into one long minified JS file which was apparently causing one of my scripts to break, only when served over https. It has been raised as a bug with Cloud Flare support (as it is odd that it works over http but not https). This particular issue was with sss.js (Super Simple Slider) the solution supplied by Cloud Flare Support was to change my script tag for sss.js from:
<script type="text/javascript" src="js/sss.js"></script>
and adding data-cfasync="false" to the tag:
<script type="text/javascript" data-cfasync="false" src="js/sss.js"></script>
Apparently this extra bit of code makes Cloud Flare's Auto-Minifier and Rocket Loader ignore that particular file.
Sorry this might be a newbie question but I am quite new to Umbraco.
I have a media picker set up on a document type, and it all works fine.
So I go to the template and enter
#Umbraco.Field("bottomRightLarge")
this only gives me the ID of the image, how can I get this to show the actual image the user has selected?
I am using UMBRACO 7 - and I have tried http://our.umbraco.org/projects/website-utilities/social-bookmarking-button/general-discussions/19360-Displaying-an-image-from-Media-Picker-in-a-web-page - but the XSLT ERRORS bug time.
Try using the umbraco image item if using webforms or umbraco media for mvc
<img src="#Umbraco.Media(model.articleImageOne).Url" alt="">
or
<umbraco:Image field="articleImageOne" runat="server" />
This worked for me
<umbraco:Macro runat="server" language="cshtml">
<img src="#Model.MediaById(Model.topleftsmall).umbracoFile" alt=""/>
</umbraco:Macro>
please note I was trying this on firefox 20.0.1, and the save just didnt work properly.
I am trying to create a "pinterest share" button, but am running into a snag.
Currently, I have the pinterest button (generated from their Widget Builder) appearing in a Lightbox. (For certain reasons, it must appear this way.)
The issue is the Lightbox code has direct linking on it, so the code for the lightbox window is something like: www.domain.com/#/social/4
Pinterest is picking up that URL (which has no images since it's just the lightbox) instead of the URL for the main page (www.domain.com).
Does anyone know how I can specify the exact URL to share via the pinterest button?
I have read some posts that said doing this would work:
<img src="//assets.pinterest.com/images/PinExt.png" alt="Pin it" / > <script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
However, specifying the URL does not seem to work at all. It appears to be totally ignored and has no impact.
Any ideas?
Thanks in advance!
You can use a standard link and specify all the data in the parameters:
<a href="http://www.pinterest.com/pin/create/button/
?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F
&media=http%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg
&description=Next%20stop%3A%20Pinterest"
data-pin-do="buttonPin"
data-pin-config="above">
<img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" />
</a>
Source: http://developers.pinterest.com/pin_it/
You can try using structured meta data and Rich Pins.