Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-04-08 09:22:47

Szorstki
Member
From: Poland
Registered: 2012-05-27
Posts: 20

TXP images

Hi there, I’ve problem with images that I’ve never faced before on txp…
I am displaying an image in my form, just like that:

<txp:upm_image image_id="15"/>
<txp:images id="15" />
<img src="images/15.png" alt="Karty bankowe"/>

First line (with the plug-in) works on every page.
Second – don’t work at all, there is only alt text displayed…
Third, I was using always… work only on index page, on the sub-pages I get alt text.

Is anything wrong with third pure HTML way? Newest TXP, newest xampp-portable. Windows 7 if it matters.

Offline

#2 2013-04-08 09:47:28

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,315
Website

Re: TXP images

Hi you have an extra “s” try

<txp:image id="15" />

txp:images is different than txp:image look ar documentation/wiki to see what each one do.

Cheers

Offline

#3 2013-04-08 10:25:06

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,209
Website

Re: TXP images

Also as a side note, upm_image isn’t really needed any more. <txp:images /> handles pretty much everything that plugin did.

Offline

#4 2013-04-08 12:23:48

Szorstki
Member
From: Poland
Registered: 2012-05-27
Posts: 20

Re: TXP images

Thanks a lot – I’ve just pushed ctrl+f in txp tag reference and images looked good for me :P txp:image works perfectly.
I also removed upm_image – I’m not up to date with plug-ins (plug-in repo needed ;) )

Offline

#5 2013-04-08 21:21:49

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: TXP images

Szorstki wrote:

<img src="images/15.png" alt="Karty bankowe"/>

For this to work on sub pages, I would have thought that you needed to put:

<img src="/images/15.png" alt="Karty bankowe"/>

Which should force the URL to start at the root level of your site, rather than a pure relative link starting from the current URL.

Offline

#6 2013-04-08 21:46:38

Szorstki
Member
From: Poland
Registered: 2012-05-27
Posts: 20

Re: TXP images

<img src="/images/15.png" alt="Karty bankowe"/>

Didn’t worked even on index – I’ve tried that and was confused.

Offline

#7 2013-04-09 08:11:20

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,315
Website

Re: TXP images

Hi

use txp:image to output the image and then look at the source of your page in the browser (on firefox use CTRL+U) then look at the img src to see what is done that can gives you a hint where is the problem with your directory.

Cheers

Offline

#8 2013-04-09 15:28:14

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,251
Website

Re: TXP images

Another option:


<img src="<txp:site_url/>images/15.png" alt="Karty bankowe"/>

My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB