DrQuincy Posted December 13, 2023 Share Posted December 13, 2023 When you access an image from the API you can get the width and height with $imade->width() and $image->height(). When you run these internally does ProcessWire get the sizes from the database or does it actually use GD to get them? I'm assuming if you aren't creating variations on the fly it just reads them from the database (the schema has width and height columns). Just checking that there won't be any significant overhead if doing this on lots of images. Link to comment Share on other sites More sharing options...
monollonom Posted December 13, 2023 Share Posted December 13, 2023 @Robin S brought up this issue not so long ago and it’s been fixed since. So yes it does pull from the database directly, see https://github.com/processwire/processwire-issues/issues/1812 1 Link to comment Share on other sites More sharing options...
DrQuincy Posted December 13, 2023 Author Share Posted December 13, 2023 Thanks! So I guess since that github comment is ~3 months old you have to be on a fairly recent version for the performance increase. Link to comment Share on other sites More sharing options...
monollonom Posted December 13, 2023 Share Posted December 13, 2023 It’s actually on the current master version (3.0.229) though the fix for svg files mentionned in the issue as well is only on the dev one 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now