Jump to content

Does $image->size(x,y) create new image each time when the method is called?


Recommended Posts

Posted

Or it returns existing image, if image with such dimensions already exists (e.g. has been created formerly)?

Or in other words - do I need to cycle through $image->getVariations() in order to minimize load onto the server? Or there is another/PW-way to get specific image variation, without image generation if it already exists?

Thanks in advance for tip!

Posted

PW caches any image sizes you create with $image->size(), $image->width() or $image->height(). 

They are all stored in your assets folder and called directly if they already exist.

  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...