Forum
Multiple images
hi,
I want to create multiple images when I upload an image. How do I make them at upload time, and how do I access the different sized images later on through other templates?
hi,
I want to create multiple images when I upload an image. How do I make them at upload time, and how do I access the different sized images later on through other templates?
Just use the same ID with different heights and widths. Then use the same perch template tag along with the width and height in other templates.
Thanks, I see that I have to include the different sizes in my original template, but if I do as below, then my code outputs all versions. I tried using suppress="true" but they still output.
Can you suggest a method to create multiple sizes at upload time but only display one on the page? Do I need to create two templates for the same page?
Worked for me? I just wrapped the original Perch:Content in an IMG tag.
suppress="true"
is the way to do it. Can you show me evidence of it not working?Figured it out.
The image was being used to change a div's background image in line.
This didn't work as it was over 2 lines, the output html was not seen to be valid property value:
However this worked having the 2 different sized images on one line:
You don't actually need to have the 'Suppressed" images in the same line.
I tend to put all my suppressed images at the bottom of the template so I can see them at a glance. Have a look at the default BLOG template for 'post.html' and you will see the following outside of the required code: