Search code examples
modxmodx-revolution

Crop images to ratio in Modx TV


Is there some plugin/way to crop images when they are uploaded in a Modx TV?
I got a slider with a ratio of 1:4. Now when the user uploads a image in another ratio, the image will stretch out.

I want something like Facebook does when you upload a cover image which is to high.

(PS: I want to use it later in Migx)


Solution

  • Like 'okyanet' mentioned you can use phpThumbOf to set the dimensions/ratio when MODx delivers the image.

    Another way would be to use the extra 'Image+'. You still need phpThumbOf for this, but the Editor can define the clipping manually in the Manager. And you can define the ratio of the clipping in the TV-Setting for the image.