The title says it all. Is it possible at all?

Comments

1mundus’s picture

Well, it seems that there is an unexpected easy solution. Go to block configuration page and under Link Text choose your image token and append the img HTML tag. Here is the example:

<img src="/files/styles/thumb/public/[node:field-NAMEOFYOURIMAGECCKFIELD:file]"</img>

EannaC’s picture

I've been looking for this solution for a while, and i seems like you've got exactly what I want.
One problem.... where's the "Link Text" field? I can't see it anywhere!

Thanks

1mundus’s picture

1. Go to "Structure" - "Blocks".

2. Find your "Prev/Next links" block

3. Expand "Previous node" and "Next node" sections and there you'll see "Link text" headings.

michael.k’s picture

I've also been looking feverishly for a way to get thumbnail images to display along with the node title, but can't get your method to work. Would you mind showing what actually goes in those fields in the block?

I've tried:

<img src="/files/styles/thumbnail/public/photos/[node:field_photo_file]"</img> and
<img src="/files/styles/thumbnail/public/photos/[node:field_photo_file:file]"</img>

plus many other token combinations, but I just can't get the thumbnail image to display.

Thanks!

1mundus’s picture

Try to remove "photos/", I didn't use that part with this token.

Try this approach:

1. Open your image processed by the image preset
2. Write down that address
3. Compare the difference between that address (full path from #2) and the path without the token (you are missing e. g..
4. test which token produces the difference from #3.

michael.k’s picture

Thanks for your reply. I was finally able to get it to work after using the full path:

<img src="http://localhost/sites/default/files/styles/medium/public/photos/[node:field-photo:file]"</img>

After that, there are only 23 more characters left in the field (128 characters max), so there's not much more room for other tokens.

Anyway, once the full path worked, then I could verify these, too:

<img src="/sites/default/files/styles/medium/public/photos/[node:field-photo:file]"</img>

<img typeof="foaf:Image" src="/sites/default/files/styles/medium/public/photos/[node:field-photo:file]"</img>

Also just to be clear for others, since "medium" is the name of the preset in this case, one just needs to switch out the name of the desired preset (once it's created of course).

bhosmer’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)