If I have a site that will eventually have thousands of product images on it, would using image transforms slow things down?
2 Answers
Nope. Once a transform has been generated once, Craft remembers that, and saves it right in your asset source. Future page loads will get a direct URL to that generated image, so it gets loaded via your webserver (or S3, etc.) directly. No PHP involved.
-
Then you’ll start getting 404s on that image, since Craft won’t be aware that the file doesn’t exist anymore. You can always clear your craft_assettransformindex table though, which is where Craft stores its records of all generated transforms. Commented Jun 15, 2014 at 3:46
-
-
Sorry I deleted that comment because I thought Brad made the race.. But then your very satisfying answer popped up :)– carlcsCommented Jun 15, 2014 at 3:54
-
I just thought of something- what if Google PageSpeed has grabbed the images after the first time and is now serving them?– cmcjaneCommented Jun 16, 2014 at 12:46
For all practical purposes, no. The performance hit for images transforms happens the first time the transform is requested and generated. After that, the images are served as a normal file that your web server can serve up as quickly as any other file.
-
2
-
-
-
In what context? The transformed image? The source image?– Brad Bell ♦Commented Jun 15, 2014 at 3:42
-
The transformed image is missing, does this trigger another transform? If yes, is there any script that initializes this and doesn't that take performance?– carlcsCommented Jun 15, 2014 at 3:49