Images being Cropped

General web design discussion, including HTML, CSS, and JavaScript

Images being Cropped

Postby gsw28 » Mon Dec 17, 2012 3:09 pm

Sometimes when I upload an image it gets cropped. Is there a way to change the position or edit the thumbnail.

Take a look at the top article in the link below to see what I'm talking about. I would like it so it doesn't crop the persons face.

Posts: 8
Joined: Fri Dec 07, 2012 4:40 pm

Re: Images being Cropped

Postby raw10 » Mon Dec 17, 2012 3:35 pm

You can make it so that it always crops the image to the top, if appropriate. Instead of giving the image an explicit width and height, use the cl_effects option:

Code: Select all
<img magicedit me_name="myImage" src="myImage.jpg" cl_effects="zoom=200,100,1,top" />

In this case, the system will set the new image to 200 pixels wide by 100 pixels tall, and if it needs to be cropped it will crop to the top of the image.

You can also turn off cropping and maintain the original's aspect ratio by just setting a width (don't set a height), or using the following effect:

Code: Select all
<img magicedit me_name="myImage" src="myImage.jpg" cl_effects="maxsize=200,,1,top" />

If you set both a width and a height, the system will size the image to fit the constraints set in the effects. You can read more about each available option here:

We are working on making images user croppable, but that feature isn't quite ready!
Posts: 81
Joined: Tue Apr 12, 2011 2:46 pm

Return to Web Design

Who is online

Users browsing this forum: No registered users and 1 guest