After publishing to the local IIS a web application the header logo image and favicon throw an error 403.
Logo:<img src="#Url.Content("~/Content/logo.jpg")" class="navbar-left" />
Favicon is in the root.
The application pool run in the name of an AD user.
I've given the full right to Everyone to the app folder with inheritance.
Everithing's OK but these two images. Please, help me.
To do this you must convert your image to a png format. kindly go through this steps:
Go to this: http://www.favicon-generator.org/
Download & Extract the favicons.
Choose the size & Replace the code like this :
<link rel="apple-touch-icon" sizes="64x64" href="#Url.Content("#Url.Content("~/Content/favicon-64x64.png")">
Related
I am trying to share the product url using facebook sharer and the link is also sharing properly but the problem is that while sharing, it didn't sharing the product image. Its sharing some other random image from the page, I don't understand why its happening. Also, while sharing contents contain the html tags.
Here is my sharer url :
Here is my image while sharing:
enter image description here
I have also added the line in <head></head> i.e.
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
but not useful.
Please help me out, I am poorly trapped in it.
You just need to put the following line
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
And debug in facebook debugger. if it doesn't show the correct image, click Scrape again button.
Also, something is wrong in your og:description. That's why its showing the code
Using https://github.com/appcelerator-modules/Ti.WKWebView I create my 'html content' on the fly using data from a JSON feed, and then pipe that into the WKWebView which works beautifully WKWebView.setHtml(myContent);
Now with a standard ti web view I have a line in the myContent variable (basically a giant string of HTML) that says <link rel="stylesheet" type="text/css" href="myfiles/style.css" /> which would style things wonderfully.
This however doesn't work on WKWebview. Upon further trial and error I see that I can't include any local files into WKWebView this way. If I set it to a remote file on a web server, then it works just fine.
But for some reason it doesn't want to pull up local files. Is this something with the design of Ti.WKWebView or am I doing something wrong?
Praying hansemannnn reads these pages as I can see no other way of creating an issue on Github
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.
Can anybody tell me or give me a link to go to which can tell me how to implement and display images step by step (I'm only beginning) on a webpage from a spring project
I'm using IntelliJ
Thanks
What's the URL of the page? The one that appears in the location bar of your browser?
That is the URL to which relative locations are resolved in the HTML code. So, if the URL is http://localhost/MyApp/foo.html, and the URL of the CSS inside the HTML code is ../../css/style.css, the absolute URL where the browse will try to find the CSS will be http://localhost/MyApp/../../css/style.css, which doesn't make sense.
I prefer always using absolute paths for images and CSS files (and other resources). Using JSTL, that makes it like
<link href="<c:url value='/css/style.css'/>" ...
The <c:url> tag takes care of prepending the application context (/MyApp) to the path.
Note that relative paths inside CSS files are not resolved relative to the page URL, but relative to the location of the CSS file itself. So the path in your CSS file is correct.
When you share a link on facebook it will automatically find images on the website and randomly picks one as a preview. How can you influence the preview image? When a person shares the website link on his facebook?
1. Include the Open Graph XML namespace extension to your HTML declaration
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://ogp.me/ns/fb#">
2. Inside your <head></head> use the following meta tag to define the image you want to use
<meta property="og:image" content="fully_qualified_image_url_here" />
Read more about open graph protocol here.
After doing the above, use the Facebook "Object Debugger" if the image does not show up correctly. Also note the first time shared it still won't show up unless height and width are also specified, see Share on Facebook - Thumbnail not showing for the first time
Note also that if you have wordpress just scroll down to the bottom of the webpage when in edit mode, and select "featured image" (bottom right side of screen).
Years and years pass and this problem with the facebook cache has not yet been solved ...
Why doesn't facebook put a button to totally clear the cache in Debug Tools ???? How difficult is that?
OK ... Now the definitive solution:
Use this on "og:image"....: ?[sequentialNumber] example: ?1 / ?2 / ?3 .....
Example of use:
<meta property="og:image" content="http://example.com/image.jpg?1" />
Did you change the image? Add 1 to the number ...
<meta property="og:image" content="http://example.com/image.jpg?2" />
Each time the image is changed, add 1 to the number
This can be done manually or dynamically, with PHP for example.
It's working really well for me, I hope I helped.
If you're using Weebly, start by viewing the published site and right-clicking the image to Copy Image Address. Then in Weebly, go to Edit Site, Pages, click the page you wish to use, SEO Settings, under Header Code enter the code from Shef's answer:
<meta property="og:image" content="/uploads/..." />
just replacing /uploads/... with the copied image address. Click Publish to apply the change.
You can skip the part of Shef's answer about namespace, because that's already set by default in Weebly.