How to get src path from TV image in ModX? - modx

The situtation is the following: I have a TV of image type called [image-news]. When I call it in a chunk it represents
<img src="assets/images/gallery/обследование(2).jpg">
Is there a way to get src-url of the template variable or to change its css-properties?

Just change tv "output options" to text -

Related

Recognised file types for image preview?

Is it possible to add additional file types to be recognised as images and thus trigger automatic creation of an image view when a resource is uploaded?
SVG files will preview in CKAN, but we have to manually add the image view e.g.
https://datastore.landcareresearch.co.nz/dataset/novel-yeasts-from-new-zealand-forests/resource/3812ee6b-dd45-45c9-b425-6a18375e5727
With text (for example) we can specify file format extensions to recognise as text and automatically create a text preview (ckan.preview.text_formats...). Is there an equivalent for images?
Thanks
It would only be possible by modifying the source code for your instance:
https://github.com/ckan/ckan/blob/master/ckanext/imageview/plugin.py#L9
Seems like a great idea to have the image view on a par with the text view in this regard, so I made a pull request:
https://github.com/ckan/ckan/pull/3380

How to change the imageSource of image in?

I have an image in LiveCode that I would like to change to another image when a specific button is pressed. So far, I have tried this -
set the imageSource of image "The_Hangman" to "/HangMan/1.png"
However, I am getting an error code of:
execution error at line n/a (Object: can't set this property)
How do I fix this?
ImageSource refers to the image that is embedded in a text field, which is not what you want.
If you're using imported images, it's not intuitive at all, but the property you want to change is the text property:
set the text of image "abc" to the text of image "xyz"
Setting the text property changes the imageData and alphaData of the designated image at the same time.
If you're using referenced images (images outside your stack), set the fileName property of the image you want to change to the file path of the new image.
Here's how to do it using external image files:
Let's say you have your images stored in a folder called "images" that is in the same location on your disk as your stack file.
put "hang1.png,hang2.png,hang3.png" into tImgList
put 1 into tCurrImg
set the fileName of image "The_Hangman" to \
(specialFolderPath("resources") & item tCurrImg of tImgList)
Now by simply changing the value of tCurrImg you can display whichever external image file you want.

How can I tell TYPO3, to not convert SVG graphics to GIF graphics

I'm using TYPO3 6.1 with an Amazon S3 bucket over the File Abstraction Layer.
Now I want to add an SVG image with the "Images Only" content element.
I can select it, but in the frontend, it shows not the svg. It creates a gif file and shows that.
Expected output:
<img src="https://[MYBUCKET].s3.amazonaws.com/images/partner/samsung.svg">
Actual output:
<img src="https://[MYBUCKET].s3.amazonaws.com/_temp_/csm_samsung_caab942deb.gif">
I don't want that TYPO3 convert or copy any File. It should always use the original path. How do I do that?
Look in "Admin Tools" -> "Install" and select "Image Processing" there u can changes the processing file type/format.
But I will not recomment it but about SVG read This
Don't disable image processing. Make sure that SVG is defined as an image type in the [GFX][imagefile_ext] setting in the Install Tool. If SVG isn't explicitly defined as being an image type, TYPO3 will convert it.

Remove/disable Image Rendition Selection when adding a picture to a custom Content Type

Is it possible to remove/disable the selection of the Image Rendition when selecting a picture in a custom content type?
Any User/Contributer should not be able to choose the image Rendition because it happens programmatically in the Display Template. The Picture must always be choosen as Full Size Image!
Has anyone an idea how i can set this up?
As i remember Image Renditions are implemented using query string params so you can always ignore provided by user image rendition and override it in your display template.
I imported the picture in the Item_Custom.html Template (masterpages\Display Templates\Cotrol Web Parts\Item_Custom.html) like I did in the other Templates:
<mso:ManagedPropertyMapping msdt:dt="string">'Category Image'{Category Image}:'MyCategoryImageOWSIMGE',' .... </mso:ManagedPropertyMapping>
Then Set the JS Variable:
<!--#_
var CategoryImage = $getItemValue(ctx, "Category Image");
_#-->
And manually set the Rendition ID, no matter what was choosen by the user:
<img style="visibility: visible;" src="_#= CategoryImage =#_?RenditionID=7" id="CategoryImage" onload ... >

Orchard CMS display image from MediaPicker using Projector

I have a content type with a MediaPicker field in it. The MediaPicker allows the contributor to select an image for the content type. I'm using Projector to develop a page that renders a list of this content type, but the image doesn't display. I modified the "Rewrite Results" in the layouts for the Projector to write the field to an image: <img src="{Text}"/>
But this produces: <img src="~/Media/.../picture.jpg"/> and doesn't convert the tilde ~/ to the correct path.
Can you tell me what I'm doing wrong? What is the best way to render an image using the Projector module?
Thanks!
I posted on my blog a solution that resolves this issue:
http://coderkelly.wordpress.com/2012/04/18/solved-projector-module-layout-to-display-media-picker-field-as-image/

Resources