Auto size images using Percent

Open to all! Ask other shopowners for help.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Auto size images using Percent

Post by radhavallabh »

burt wrote: Fri May 17, 2024 11:55 am Steve is correct. The sizing would usually be done on the div (note this is NOT useable code);

Code: Select all

<div 100%>
  <div 50%>
    <img>
  </div>
</div>
Now your image is in the 50% div that is half of the larger div.

Alternatively you can use width utility;

https://getbootstrap.com/docs/4.6/utili ... the-parent
Hi;
Thank you for this nice tip dear;
But it is not reducing the image size on the console area, once it reduces the image addon can save it as a reduced size thumb.
Actually google insight still takes the original size of the image, saying I need to reduce the image size.
Regds./
radhavallabh


Join The Code Co-op to get access to your library in the Code Co-op Forum
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Auto size images using Percent

Post by 14Steve14 »

radhavallabh wrote: Fri May 17, 2024 12:41 pm
But it is not reducing the image size on the console area, once it reduces the image addon can save it as a reduced size thumb.
Does that mean that you need to reduce the actual image size, or the file size of the image. I am taking it that you are checking page load times and that sort of thing. If so try changing the format of the image to something like .webp.

Most of the images on our site are 600x600 pixels and we have no problems with load times. One some pages the images are 1200x1200jpg and again they load really fast.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Auto size images using Percent

Post by radhavallabh »

14Steve14 wrote: Fri May 17, 2024 1:38 pm
radhavallabh wrote: Fri May 17, 2024 12:41 pm
But it is not reducing the image size on the console area, once it reduces the image addon can save it as a reduced size thumb.
Does that mean that you need to reduce the actual image size, or the file size of the image. I am taking it that you are checking page load times and that sort of thing. If so try changing the format of the image to something like .webp.

Most of the images on our site are 600x600 pixels and we have no problems with load times. One some pages the images are 1200x1200jpg and again they load really fast.
Done that dear webp does shave of much load time,
but google expects to have images relevant for each browser size and deducts points for size issues.
So expected that percent could help me generate width and height height as required by browser and , the image file thumbs would auto create by the addon.

Thank you for being so helpful....
Hope I am able to achieve this....
Warm Regds./
radhavallabh
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Auto size images using Percent

Post by 14Steve14 »

radhavallabh wrote: Sat May 18, 2024 6:54 am but google expects to have images relevant for each browser size and deducts points for size issues.
Where are you seeing that to. We have never had a problem with our images resizing automatically. The only place we see anything about images in when we test website loading times and it mentions about a fraction of asecond could be saved with smaller image sizes and we are using jpg. With the new website we are developing we hope to start using webp images.

Would adding in the app.php/addons/free_addon/kissit_image_thumbnailer or the pro version help.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Auto size images using Percent

Post by radhavallabh »

14Steve14 wrote: Sat May 18, 2024 8:52 am
radhavallabh wrote: Sat May 18, 2024 6:54 am but google expects to have images relevant for each browser size and deducts points for size issues.
Where are you seeing that to. We have never had a problem with our images resizing automatically. The only place we see anything about images in when we test website loading times and it mentions about a fraction of asecond could be saved with smaller image sizes and we are using jpg. With the new website we are developing we hope to start using webp images.

Would adding in the app.php/addons/free_addon/kissit_image_thumbnailer or the pro version help.
Was using pagespeed.dev tool there it shows in the issues section the relevant size of images to be created depending of browser which reduces delay in load...
That Kissit addon only creates thumbnails of the image sizes given on the configuration side which is limited to some fields only..., it does not auto create thumbnails of all image sizes other than those dear...
Regds./
radhavallabh
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Auto size images using Percent

Post by ecartz »

radhavallabh wrote: Tue Apr 30, 2024 7:04 am Is there something I need to define somewhere else too for it to work?
Under admin > Images > Calculate Image Size, turn to false. I believe that would fix your issue in a plain core version of the store. Because the only place that I see it converting from string to int is in the size calculation.

I don't believe that any image thumbnailer will support % signs when creating thumbnails, as % is a client-side setting. There's no way for it to magically know what size you want your images on the server. So if you get % working, it is likely to disable the thumbnailer and just use the largest image. Thus, I don't think it will help you with Google.

In general, questions about the free version of KISS IT should be asked at app.php/addons/free_addon/kissit_image_ ... er/support

If you have the Pro version, presumably you received support instructions with the package. If you did not, I would suggest using email to request them.

I.e. I'm suggesting that if you want to know how to configure KISS IT to create proper image sizes for Google that you ask raiwa via the appropriate venue. That may or may not be a supported feature now. If not, perhaps there is a way that you could get him to add it.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Auto size images using Percent

Post by radhavallabh »

ecartz wrote: Sat May 18, 2024 9:56 am
radhavallabh wrote: Tue Apr 30, 2024 7:04 am Is there something I need to define somewhere else too for it to work?
Under admin > Images > Calculate Image Size, turn to false. I believe that would fix your issue in a plain core version of the store. Because the only place that I see it converting from string to int is in the size calculation.

I don't believe that any image thumbnailer will support % signs when creating thumbnails, as % is a client-side setting. There's no way for it to magically know what size you want your images on the server. So if you get % working, it is likely to disable the thumbnailer and just use the largest image. Thus, I don't think it will help you with Google.

In general, questions about the free version of KISS IT should be asked at app.php/addons/free_addon/kissit_image_ ... er/support

If you have the Pro version, presumably you received support instructions with the package. If you did not, I would suggest using email to request them.

I.e. I'm suggesting that if you want to know how to configure KISS IT to create proper image sizes for Google that you ask raiwa via the appropriate venue. That may or may not be a supported feature now. If not, perhaps there is a way that you could get him to add it.
Thank you so much dear also for explaining this to me in detail;
Will turn off the calculate image size right away :)
Shall surely move in this same direction...

Thank you again;
Very Warm Regds./
radhavallabh


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply