[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
ccimagesize  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

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
[WWW]
CaptainCasa

Power User
[Avatar]

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
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

perfekt, thx
[WWW]
mreich

Power User
[Avatar]

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?
[WWW]
CaptainCasa

Power User
[Avatar]

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
CaptainCasa

Power User
[Avatar]

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
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team