Question

I'm using phpThumb (mainly because of the excellent reflection addon) and need to resize an image to a specific height, and the width be taken care of automatically (dynamic).

Looking at the documentation, it seems to require both width and height parameters: https://github.com/masterexploder/PHPThumb/wiki/Basic-Usage

Is there any way around this or do I have to resort to the usual GD image method?

Was it helpful?

Solution

I'm not sure what you mean with the usual GD image method but if you use getimagesize (yes, GD...) to get the image dimensions, you can easily calculate the new width and use phpThumb like you do now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top