{"action":"opened","issue":{"url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/240","labels_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/240/comments","events_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/240/events","html_url":"https://github.com/nopSolutions/nopCommerce/issues/240","id":126878070,"number":240,"title":"Image cropping","user":{"login":"mariannk","id":16681184,"avatar_url":"https://avatars.githubusercontent.com/u/16681184?v=3","gravatar_id":"","url":"https://api.github.com/users/mariannk","html_url":"https://github.com/mariannk","followers_url":"https://api.github.com/users/mariannk/followers","following_url":"https://api.github.com/users/mariannk/following{/other_user}","gists_url":"https://api.github.com/users/mariannk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariannk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariannk/subscriptions","organizations_url":"https://api.github.com/users/mariannk/orgs","repos_url":"https://api.github.com/users/mariannk/repos","events_url":"https://api.github.com/users/mariannk/events{/privacy}","received_events_url":"https://api.github.com/users/mariannk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-15T14:02:16Z","updated_at":"2016-01-15T14:02:16Z","closed_at":null,"body":"So what we find with some of our clients is that they are not very graphic literate or at least do not remember what aspect ratio images they are supposed to upload to maintain a consistent design. \r\n\r\ne.g. they are told to only upload square images yet will upload all aspect ratios. \r\n\r\nIt would be nice if instead of nop just creating scaled images they could be cropped to the required aspect ratio and then scaled to the required size. \r\n\r\nThis would require aspect ratios to be stored for each image type(ProductThumb , tho I suspect most designs will have the same ratio through out and a setting for each to determine if they should be cropped. \r\n\r\nHow cropping should work;-\r\n1. Width crop - the crop area should be centered with the edges of the image discarded equally\r\n2. Height crop - crop should probably be taken from the top of the image as most portrait photos will have the interesting bit at the top. However maybe a setting to switch between this and center cropping?\r\n\r\nThis behavior is somewhat consistent with Facebooks behavior in that while FB allows uploading of all aspect ratios most images are previewed as a square. \r\n\r\nForum source: http://www.nopcommerce.com/boards/t/19999/image-cropping.aspx"}}