Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
TXP 4.2.0 and Textile image size problem
I’m busy finalising a website before it goes live, and have encountered a strange problem – Textile displays the image, but gets the sizes wrong. But only on a particular stretch of pages, and only since I upgraded from 4.06 to 4.2.0
For example, if you visit the Kenneth Frampton article (you’ll find it just below the fold), you’ll notice that the first image is rendered with a width and height of 325px. The image’s actual size is 240×260px, verified in the MySQL database.
I’m specifying the image in Textile like so:
...covering the first four decades of his practice. !../images/37.jpg(Harry Seidler - Four Decades of Architecture)! This I agreed to do, providing a local architectural writer...All the other images on the same url suffer the same problems.
I’m stumped. Anyone have any suggestions?
Thanks
Offline
Re: TXP 4.2.0 and Textile image size problem
try adding it in this format <img src=“http://all-sorts.biz/hsa/images/37.jpg” width=“240” height=“260” alt=“imagel” title=“image” /> .. and see if this renders it right
…. texted postive
Offline
Re: TXP 4.2.0 and Textile image size problem
Please post the relevant IMG element code as visible from HTML view in the write tab. Also, try absolute image URIs to see if that matters, like so !http://example.com/images/42.png!
Offline
Re: TXP 4.2.0 and Textile image size problem
Thanks, Giovanni & Robert
Doh! Dunno why I didn’t think of that myself: using an absolutely referenced image does the trick.
Best
Gary
Offline
Re: TXP 4.2.0 and Textile image size problem
Random notes:
Testing this, I find that !../images/37.jpg!
results in src="./images/37.jpg"
in the HTML. Strange…
Textile doesn’t look in the DB to find the image size. For relative URLs it attempts getimagesize()
on the actual file. For absolute URLs, nothing.
Root relative (i.e., !/images/37.jpg!
) works. So, of course, does <txp:image id="37" />
(in which case height
and width
, as well as title
and alt
attributes, will be pulled from the database).
Code is topiary
Offline
Re: TXP 4.2.0 and Textile image size problem
jsoo wrote:
So, of course, does @<txp:image id=“37” />
I tried that earlier, but the parser tripped up – it stops parsing the remaining articles altogether i.e. the Frampton article ends up as the last one on the page…
update
I’ve noticed that the final @</body></html> are missing on the page as well – something is fishy with my set-up…
Hmmph; it can wait for the morning. Code is easier to understand with coffee ;-)
Last edited by giz (2009-09-24 11:42:19)
Offline
Re: TXP 4.2.0 and Textile image size problem
giz wrote:
I tried that earlier, but the parser tripped up – it stops parsing the remaining articles altogether i.e. the Frampton article ends up as the last one on the page…
Suggestive of a Txp tag error or malformed tag somewhere on the page.
Code is topiary
Offline
Re: TXP 4.2.0 and Textile image size problem
Hah! You beat me to the punch, jsoo. Certainly looks like a malformed tag.
Offline
Re: TXP 4.2.0 and Textile image size problem
Hi Gary, Also remember that later version txps are very unforgiving to extra spaces or unclosed tags.
A tag trace detects the major errors … normally.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: TXP 4.2.0 and Textile image size problem
colak wrote:
Hi Gary, Also remember that later version txps are very unforgiving to extra spaces or unclosed tags.
A tag trace detects the major errors … normally.
Hi Yiannis
The tag-trace shows nothing untoward. I’m gonna <txp:hide>remove</txp:hide>
portions of the code until things correct themselves (fresh coffee clutched in hand).
Last edited by giz (2009-09-24 22:33:49)
Offline
Re: TXP 4.2.0 and Textile image size problem
I found the culprit – an instance of zem_contact within <txp:hide>
tags…
I have closing body and html tags again. krusty.w3.org will be pleased.
Update
All appears normal but I still end up <txp:image id="37" />
causing subsequent articles on the page to disappear…
The tag trace shows:
blah-blah
[ ~~~ secondpass ~~~ ]
<txp:image id="37" />
[SQL (8.4877014160156E-5): select * from hsa_txp_image as txp_image where id = 37 limit 1]
and then ends.
For the moment I’ll use absolute image urls in Textile.
Last edited by giz (2009-09-24 23:10:03)
Offline