Author |
Message |
25/05/2024 08:39:26
|
mreich
Power User
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
Hi,
I've a page with a lot of thumbnails on it (about 50!) each tajes about 70ms
The ajax for ccimagesize has the same duration as the request for loading the images.
I show the images 1:1 in the frontend, no width oder height setting, is the ccimagesize request really necessary in this case?
If I could ommit these calls, the loading what be a lot faster?
regards
Markus
|
|
|
25/05/2024 09:05:52
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5535
Offline
|
Hi,
one way is to explicitly set IMAGEHEIGHT and IMAGEWIDTH in the IMAGE or ICON/BUTTON/...
Another one is to help the client with "proper" naming of images. If they end with "xxx_<width>x<height>.ext" e.g. "cancel_16x16.svg" then the client takes this as width/height and does not recalculate.
Kind regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
25/05/2024 09:07:40
|
mreich
Power User
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
perfekt, thx
|
|
|
25/05/2024 09:23:07
|
mreich
Power User
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
ok, I tried to set imageheight und imagewidth hard, but xhr request still is fired
also when I additionally set height and width?
|
|
|
25/05/2024 09:28:03
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5535
Offline
|
...in the image the HEIGHT and the WIDTH are the space that is occupied by the image. How the image is rendered into this HEIGHT and WIDTH is defined by additional parameters:
KEEPRATIO=true now says, that the ratio of the image is kept during resizing
KEEPRATIOFITMODE=contain/cover defines how the image is "pressed" into the given HEIGHT/WIDTH, "contain" shows full image and shows remaining space as consequence, "cover" fills the region but cuts parts of the image.
Kind regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
25/05/2024 09:30:25
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5535
Offline
|
...sorry, the previous message did not respond fully to your question. You are right (just check the code): the ccimagesize request is still fired. - If possible: use the naming convention then I guarantee for not firing any request...
Kind regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|