PDA

View Full Version : Question: Resizing Pet images for the myadopts and stats etc


Missy Master
03-31-2013, 03:16 PM
I'm posting this question here in case others need to see how to do this :)

How would we resize the images shown on the myadopts and stats and market etc pages, for the pet images? Right now mine are all showing at regular size, and that would be fine for the manage section but the lists where there are a lot, each pet really dominates!

I tried this:

$image->resize(150);

in various places but no go, and I don't want to mess anything up! Plus Im not sure how to do it as 150 x 200 or something. Thanks for the help! :)

AlexC
04-02-2013, 07:13 AM
Well, one way you could resize all pets is through the css sheet of your theme. Theoretically, (I don't know if this would work but it sounds like it might) you could put classes around certain images in the code and then in the stylesheet, specify that all images in that class are a certain size.

The only downsize is it would probably resize all images.

Hall of Famer
04-03-2013, 10:05 AM
I've solved this problem for Anna. Resizing an adoptable's image can be a bit tricky, since the image is wrapped inside a Link Object. For this reason, you have to get the link object and retrieve its image property before playing with image attributes.