Jump to content

Recommended Posts

Posted

Trying to resize an image that way but gives me a 500 error

 

//OPTION A (500 error)
echo "<img src='{$page->images->eq(0)->resize(340,480)->url}' alt=''>"


//OPTION B  (500 erro either)
$myImage = $page->images->eq(0);
$myResized = $myImage->resize(340,480);
echo "<img src='{$myResized->url}' alt=''>"

 

Posted
11 minutes ago, kixe said:

What about putting a semicolon to the end of your echo line?

That, and it should be $image->size(), not resize().

  • 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...