Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Different image format to an image and its thumbnail
I imported a “.jpg” image format, and chose to import a “.png” image for the thumbnail. And this does not work.
If id of image = 7, I’ve “7.jpg” and “7t.png” in the folder “images”.
But <txp:thumbnail id="7" />
wants to display “7t.jpg”.
It is therefore not allowed to have a different image format between image and its thumbnail.
Would it be possible to have this possibility in a future version of Txp ?
Offline
Re: Different image format to an image and its thumbnail
Hi
You have to upload your thumbnail through content>images for the tags to recognize the png format.
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: Different image format to an image and its thumbnail
sacripant wrote:
It is therefore not allowed to have a different image format between image and its thumbnail.
Correct. At present the extension of the filename and its thumbnail must match or TXP rejects it.
It’s a built-in feature of the thumbnail class and I guess the restriction is there simply because the database only holds the extension of the main image, thus it must derive the filename of the thumbnail from this base:
Filename = {image_directory} + {id} + {ext}
Thumbnail = {image_directory} + {id}t + {ext}
(that’s the same reason smd_thumbnail enforces the same policy, btw).
If the database were to hold both thumbnail and image extension information, or the thumbnail’s ‘type’ was read when it was rendered to the page (slightly slower) then a separation of the two types could be achieved. But at present I have no idea if that is going to happen or not.
Last edited by Bloke (2011-02-08 16:21:34)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline