Forum
Blog Excerpt Image Size
Hi,
I am having some issues changing the image size in my blog excerpts - the image is being displayed at full size. I have altered the following line in post_in_list.html:
<perch:if exists="image"><img src="<perch:blog id="image" type="image" width="158" height="100" crop="true" />" alt="<perch:blog id="postTitle" />" /></perch:if>
But the image is still displaying at the original upload size.
Help greatly appreciated.
Mike
Have you also added that image size to the master template for blog, post.html?
Only images listed there will be created.
Hi Rachel,
Thanks for the quick reply. Where do I want to add that image size into the post.html file? I have already adjusted the image size to be displayed in a single post:
<img src="<perch:blog id="image" type="image" width="280" height="186" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
Thanks
Mike
Hi,
No worries found it! Thanks for your help!
Hey there,
would you mind to give me an info what you changed to make it work?
I have my blog set up and use four different templates:
index-post.html -> latest article complete on home page (1920 px wide image):
<img src="<perch:blog id="image" type="image" width="1920" quality="60" />" class="bericht-foto" />
index-posts.html -> excerpts of the three posts before that on the home page (960 px wide image):
<img src="<perch:blog id="image" type="image" width="960" quality="60" />" class="bericht-foto" />
(the top two added right after each other on my index.php)
all-posts.html -> Archive of all posts (960 px wide image):
<img src="<perch:blog id="image" type="image" width="960" quality="60" />" class="bericht-foto" />
post.html -> detail view (1920 px wide image):
<img src="<perch:blog id="image" type="image" width="1920" quality="60" />" class="bericht-foto" />
The detail view and full view on my home page work just fine, a 1920 px wide image is inserted. But for the smaller ones on the home page and archive view, the original 4000 x 3000 px image is inserted without any change.
Whenever I make changes to the code, I delete the image from the blog post, then from assets completely, and re-upload the image.
After reading this post I tried adding this code to post.html (just at the bottom of the file), and also tried adding
suppress="true"
. Now I get an Internal Server Error:<perch:blog id="image" type="image" width="960" quality="60" />
Would be happy to get some feedback on this.
This question has already been resolved, so you'd be best to post your question to a new thread. We don't get notified of changes to resolved questions, and I only happened upon your post by chance.
Post a new question and we'll help you out.
Thanks, will do.