By Mist on Friday, 13 February 2015
Posted in General Issues
Replies 1
Likes 0
Views 776
Votes 0
Hi guys, i want to clear something out regarding EasyBlog image resize function. I just want to understand how things works.

1. In EasyBlog backend, under template settings we can define multiple image sizes.
Here we can define the width and height, define a "name" for the setting and setup a resize method ("resize to fill" , "resize within" , "resize fit")

2. In template file views, we output the desired size like this

<?php  echo $blog->getImage()->getSource( 'setting_name' ); ?>


So my question is:

1. EasyBlog will generate the sizes on "page view" ? When i access the page the "resize" mechanism is fired and generate the required size (the one "called" in the template view) for ALL the images outputed, right ?

2. Easyblog will generate the "resized" imaged for all images or only for the ones required based on the template "call".

What i mean by this is:

a) i have image A at size "thumb" and a different one, image B at size "large"
b) in template view i will output the "thumb" image resize setting for image A and "large" setting for image B
c) When the page is loaded (all easyblog image cache cleared of course). Easyblog will generate 2 sizes ("thumb" and "large") for both images ... or will generate only the required sizes for each one ? ("thumb" for image A and "large" for image B)

Hope you guys get what i am trying to say
Hello Mist,

Please find the response to your inquiries below:


1. EasyBlog will generate the sizes on "page view" ? When i access the page the "resize" mechanism is fired and generate the required size (the one "called" in the template view) for ALL the images outputed, right ?

Yes that is correct.


2. Easyblog will generate the "resized" imaged for all images or only for the ones required based on the template "call".

Yes, that is correct.



a) i have image A at size "thumb" and a different one, image B at size "large"

If your template file requires the thumb and large version, EasyBlog will generate them both.


b) in template view i will output the "thumb" image resize setting for image A and "large" setting for image B

I am not sure what you mean by image A or image B but you can only have 1 blog image per post. If you are trying to display the "thumb" and "large", both these images would be generated.


c) When the page is loaded (all easyblog image cache cleared of course). Easyblog will generate 2 sizes ("thumb" and "large") for both images ... or will generate only the required sizes for each one ? ("thumb" for image A and "large" for image B)

Yes, it would create 2 copies of the resized images accordingly.

The idea behind this is to ensure that if your authors decides to upload an image that is insanely large, EasyBlog will be able to resize it down to a desired width / height so that the page doesn't take too long to load.

However, do take note that in EasyBlog 5 we will be standardizing 5 image sizes and you will no longer be able to define custom sizes any longer. This is to avoid confusions.
·
Saturday, 14 February 2015 02:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post