Display Images from Umbraco Media in Document - image

i create a Document(PDF) and get the Content from the Umbraco nodes.
But there's a problem by displaying the images. How can i display or get the images from the Media libary of Umbraco? Is there a way, offered from Umbraco to get the Image(s)?
Thanks a lot.

If I understand your query correctly, you a pretty much there.
You should simply be able to get the umbracoFile path (just like you are for the PDF file) and simply declare it as the img src!
With Razor...
<umbraco:Macro runat="server" language="cshtml">
<img src='#Model.MediaById(#Model.imgProperty).umbracoFile' alt="" />
</umbraco:Macro>

Related

Is it possible to serve dynamic images for email?

What I'm trying to do: Create an email campaign that will have a header image which will be personalized and display the viewers name based on FirstName data.
This may be beyond my current skill level. But I'm wondering if there isn't a service or some kind of library that will do this. I'm thinking what needs to happen is that an image needs to be served somehow that when pinged with a request like http://example.com/images/emailheader?Ralph, would serve an image with Ralph's name in it.
If this were just for the web, that would be easy. I'm not able to wrap my head around how I might do this for email however, and I'm not finding much in the search.
If you have the ability to http://example.com/images/emailheader?Ralph you have the ability to do this with names. You'll just have to do the fancy logic on the web site.
Lets use http://placekitten.com as an example because I'd rather look at kittens.
If http://placekitten.com can serve a 640x480 image of a kitten, you can serve an image for a guy named Ralph. Lets say the first name of your email target is 600/480. You would code in: http://placekitten.com/. This will give you an image named http://placekitten.com/600/480.
It would look something like this:
<p>Dear <firstname>,</p>
<p>We saw this and thought of you.</p>
<img src="http://placekitten.com/<firstname>" width="600" height="480" alt="<firstname>" style="display:block;"/>
<p>Your friends at StackOverflow.</p>
Your email ISP will take , convert it to good old 600/480, and you'd get this:
<p>Dear 600/480,</p>
<p>We saw this and thought of you.</p>
<img src="http://placekitten.com/600/480" width="600" height="480" alt="600/480" style="display:block;"/>
<p>Your friends at StackOverflow.</p>
Assuming you did your configuration on your web site for everyone named Ralph, gwally or 600/480, those images will show up in their email. There's far more to it than this, but it gets you started.
Good luck.

How to add and render multiple images/files in typo3 Fluid content element(flux)?

I am using flux and fluid content element for making content editable by user. i added field for image which allows multiple images to upload.
But now i am not able to show these images.
my value of field image is like :
image => 'kip.jpg,772_Visteon_010.jpg'
normally if i have only one value then i can show it by <f:image> or <img src="{image}" /> Tag.
so, anybody have idea how can i display multiple images or files.
Thanks in advance.
you seem to use the old style of image inclusion: comma separated list of names with copies below uploads/.
Then you need to split (https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Split/Index.html) the field and work the resulting array as before.
in the long time you should use FAL, so the handling is a little bit more complex
You should use flux inline fal for multiple images in fluid content element,
below is a syntax for inline fal,
<flux:field.inline.fal name="settings.image" label="Image" />
After that you can render it by following code,
<f:for each="{v:content.resources.fal(field: 'settings.image')}" as="image">
<f:image treatIdAsReference="1" src="{image.id}" title="{image.title}" alt="{image.alternative}"/><br/>
</f:for>
you can find detail in below url,
https://fluidtypo3.org/viewhelpers/flux/master/Field/Inline/FalViewHelper.html
hope this will help you.

How to display uploaded images in pdf using wkhtmltopdf

I am using Carrierwave to upload images in rails4.
In the html view page the image is showing. But, when generating the pdf, from this view, the image is not showing.Instead , a blank box is showing.
From the view, while inspecting the path is showing as below:
<img alt="Small images" src=" http://127.0.0.1:3000/upload_
files/6/student/image/1/small_images.jpg">
The code i used is:
<%=image_tag Student.find(id).image_url(:small) %>
If the image is stored in app/assets/images, then the images will appear.But, i need to upload the image in this location only.
Can u pls help...
Thanks in advance.
I could do it with php Laravel this way >>
<img alt="Small images" src="{{base_path().'path/to'image.jpg'}}">
I have no experiences with Ruby , but try to find something similar.

Images not showing in views block with drupal 7

I'm completely stuck on this one:
I'm working on a drupal 7 website and I have created a block (view) that should display an image with it. No matter what I try, I cant get the image displayed...
The content type I'm trying to display has 3 fields: "name", "description" and "picture".
The picture simply is an Image that's stored in a folder "myImages".
This is a picture of the block view I'm trying to create:
This does display the fields "title" and "beschrijving" (=description). The "foto" (=picture) however is not displayed... (in chrome it gives the "broken picture" logo, in firefox just nothing).
The wierd thing is: the image appears just for a blink and then disappears, meaning it is actually being rendered.
When I took a look at it with firebug I got following html:
<div class="views-field views-field-field-foto">
<span class="field-content">
<img width="100" height="100" alt="" src="sites/default/files/myImages/imageSource.jpg" typeof="foaf:Image">
</span>
</div>
And when I try to open the image itself (imageSource.jpg) I get an (500) internal server error (but I'm pretty sure this is because of the .gitignore file).
The image path is incorrect. It should look like...
src="/sites/default/files/myImages/imageSource.jpg"
...with the beginning forward slash.
I had issues when displaying images with Views, and it turned out to be the "alt text" option. In order to use "alt text" and not have issues I had to make use of the "Rewrite Results" option in Views.

Linked Image Syntax for Mediawiki

I tried to add a linked image to a wiki page without luck. The HTML syntax for the linked image is below:
<img width="300" height="220" alt="Virtual Tour" src="Path to Image" title="Virtual Tour" class="alignleft size-full wp-image-8517">
What's the right syntax for linked image in MediaWiki?
I am using [[File:Fielname.jpg|frame|||||link=External Link|alt=ALT|Caption]]
But I need to add CSS class to both A and IMG tag and it seems I cannot.
Thank you.
Create a template once Template:MyReusedImage with your image in right size, title etc.
Then reuse the template on the pages {{MyReusedImage}}

Resources