Accessing Image URL on Orchard using razor - asp.net-core

I am using Orchard CMS. I am trying to access an image URL on a razor page as per the first image attached.
The output I get through google inspection is also attached as second image. I am simply trying to get rid the square braces so that I access the actual image file
I tried these:
#post.Content.Images.Images.Paths.[0]
#post.Content.Images.Images.Paths.first()
enter image description here
enter image description here

#Orchard.AssetUrl(post.Content.Images.Images.Paths[0])

Related

How to identify img file which is loaded under network monitor console using selenium

When we navigate to a page and inspect the page, under Network monitor tab > images, we get a list of file names (Ex. imgge.png) as the page is loaded. How do i idientify the image is present when we navigate to a page using selenium script.
I have attached the screenshot for reference what im exactly referring to.
enter image description here
driver.findElement(By.id("imagefile_id")).isDisplayed();
get the id value of the image and use the above script, it return the Boolean value.

Google Plus doesn't show article image, just shows title and article link

I am trying to share a post from my website(blog) onto Google plus but it isn't showing the featured image of the article, instead it is just showing the title and link of the article. I have microdata and also "og" tags for my page. When tested using Google Structured data testing tool, it is showing all good. I expect to get some help here. If I am trying to share the home page, it is showing an image, however if I am trying to share any post from the website, it is not showing any image. Please help, let me know if you need any more info, would be happy to provide.
One of post's from website
The og:image meta tag is being used by google plus rather than the image property within your http://schema.org/BlogPosting -as #abraham pointed out this is a broken link, it should go to http://top10grocerysecrets.com/Top-10-foods-for-releiving-inflammation.jpg - currently it includes /wp-content/uploads/sites/17/2015/07/ which isn't part of the image's path.
In the structured data it is valid, but not correct: BlogPosting has an image set but without a full path which may be why it gets ignored: the source should begin http:// etc. This is also needed if you want the image to appear in the google search results preview.
The WebPage element does not have an image set: only the BlogPosting does. Consider setting the same image property using a meta tag inside the WebPage element if fixing the BlogPosting image's path does not resolve the structured data issue, e.g.
<meta itemprop="image" content="http://top10grocerysecrets.com/Top-10-foods-for-releiving-inflammation.jpg" nt-post-thumbnail wp-post-image" alt="Print" />
In the structured data there are two unrelated mistake
the BlogPosting has author set to a link with fixed IP address http://162.244.66.231/top10grocerysecrets/author/cyoung this will reduce the chance of it connecting the blog with C Young's profile on the website.
the file name http://top10grocerysecrets.com/Top-10-foods-for-releiving-inflammation.jpg has 'releiving' in it, which is not the spelling used in the text on the image itself. This doesn't matter a great deal.

Google shows alt-text as website title

I am trying to optimize a web site which is managed by typo3. There is a page on this website, let's call it seminars. When I ask google to search for this Website by entering "Big Company seminars", I receive a result which looks like that:
Logo Seminars - Big company
url://seminars.bigcompany.de
The string "Logo" should not be displayed there. So I checked the source code and found that:
<title>Seminars - Big Company</title>
and
<img src="BigCompanyLogo.png" alt="Logo Seminars">
It looks like Google takes the alternative text of this image and uses it as the title for their search results.
Any ideas?
Google Search may change webpage titles they show on their result page. You can’t control this.
About your alt content:
Is the page about "Logo Seminars", or does "Logo" mean that the image is the logo? In the latter case, you might want to remove "Logo" from the alt content (or place it, for example, in square brackets). Note that, if the image is the only content of the link, the alt content should describe the link target, not the image.

Image Not Added to PDF using FPDF

I'm using FDPF to create a PDF from a HTML form, and there is an uploaded image that I want to add to the top of the first page. Here's what I have for the line to add the image:
$pdf->Cell(40,40,$pdf->Image($uploadfile,10,10,-300), 1,'C',false);
But when the PDF is created, the image isn't there. I've tried all the other answers that I could find here, but nothing seems to be working. I know that the image is being uploaded, so I can't understand why it isn't showing up on the PDF.
Thanks in advance!
I figured out the problem. The variable for the image URL wasn't being passed to the function. I added the upload part of the code handler to the function and added the image in the header, then added more lines after it so that the body text would be put after the end of the image.

Hotlinking: How do I differentiate between an image in a <img> tag versus an image link?

I want to allow partial hotlinking to images on my website. I want to allow a specific site (Reddit) to be able to show an image from my website on their page, but if they click on the link to the image from that site, it should go to an image viewing page, rather than directly the image itself.
For example:
This other website should be able to have this
<img src="http://mySite.com/myImage.jpg"/>
on their page, and it should show the image. However, if they have this:
Link Text
A user who clicks on that link should get redirected to an image viewing page that contains some html, including the image, rather than directly to the image.
I'm trying to achieve this via mod_rewrite. However, those two cases have the same HTTP_REFERER. Is there anyway for my server to differentiate between that?
There is no way to do such thing! but if second site is your you can put optional query string at the end of URL the distinguish between them!