Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Apologies in advance i'm a complete novice to umbraco, long story short on one of my sites an image is being cropped, it spits out the following in the dom
/media/1414/kelly_500x500.jpg?width=470&height=355&mode=crop&quality=75
When i remove everything after the "?" the problem is solved.
I have located where the code is printing out the image but can't see anything to do with crop any suggestions ?
@Umbraco.Image(image, 470, 355, cssClass: "img-responsive")
Hi Jake
It looks like someone has implemented a custom helper method in your site to write out your html image tag based on various settings...
... this helper
is saying write out your <img tag and add the css clsas "img-responsive" and resize the image to be 470 wide by 355
in their implementation of this helper (check the app_code folder, or search any visual studio solution for:
Image(this UmbracoHelper,
and that should find the actual implementation...
the implementation is probably using GetCropUrl
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper
which is why your images are being cropped to the dimensions and not resized (if that is your preference)
Resize modes for ImageProcessor (that Umbraco uses for images) is here:
http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/resize/
you want to update your helper so you can write something like
@Umbraco.Image(image, 470, 355, cssClass: "img-responsive", resizeMode: "max")
and have the helper construct the url:
/media/12344/mylovelyimage.jpg?width=470&height=355&mode=max
if that helps...
regards
Marc
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How do i remove umbraco crop feaure from my img src
Hi,
Apologies in advance i'm a complete novice to umbraco, long story short on one of my sites an image is being cropped, it spits out the following in the dom
/media/1414/kelly_500x500.jpg?width=470&height=355&mode=crop&quality=75
When i remove everything after the "?" the problem is solved.
I have located where the code is printing out the image but can't see anything to do with crop any suggestions ?
@Umbraco.Image(image, 470, 355, cssClass: "img-responsive")
Hi Jake
It looks like someone has implemented a custom helper method in your site to write out your html image tag based on various settings...
... this helper
is saying write out your <img tag and add the css clsas "img-responsive" and resize the image to be 470 wide by 355
in their implementation of this helper (check the app_code folder, or search any visual studio solution for:
Image(this UmbracoHelper,
and that should find the actual implementation...
the implementation is probably using GetCropUrl
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper
which is why your images are being cropped to the dimensions and not resized (if that is your preference)
Resize modes for ImageProcessor (that Umbraco uses for images) is here:
http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/resize/
you want to update your helper so you can write something like
@Umbraco.Image(image, 470, 355, cssClass: "img-responsive", resizeMode: "max")
and have the helper construct the url:
/media/12344/mylovelyimage.jpg?width=470&height=355&mode=max
if that helps...
regards
Marc
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion