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
When using the GetCropUrl in my razor macro, the images are perfectly cropped on my development environment but ones I deploy my website to production, the images don't get cropped anymore. I'm using Umbraco 7.2.8.
This is the code I'm using in my macro:
@foreach ( var child in CurrentPage.Children )
var overviewImage = Umbraco.TypedMedia( ( int )child.ProjectOverviewImage.Id );
string imgUrl = overviewImage.GetCropUrl( 118, 118 );
string imageName = child.HasValue( PropertyAliasNames.MenuTitle ) ? child.MenuTitle : ( child.HasValue( PropertyAliasNames.PageTitle ) ? child.PageTitle : child.Name );
<a class="albumCoverThumbBorder" href="@child.Url"><img src="@imgUrl" alt="@imageName" /></a>
<br /><br /><br /><br />
And this is the result I'm getting on my machine in development:
But after publishing the website to production (shared hosting) I'm getting this as a result:
Does anybody has any clue what may cause this problem? Thanks!
The cached images of the crops are saved in App_Data. Most likely you didn't deployed that, hence the crops won't be shown. Try to resave the media item, to resaved the cropped files and see if it works.
Hi Wing, thanks for you answer. It was a completely new deployment so everything was copied to the production website, the cached images included, so this could not be the problem. And the media item is cropped on the fly in razor and not in the content node.
Any other ideas? Thanks!
I found the solution, the ImageProcessor module wasn't served because the shared hosting environment was not running in Integrated Pipeline. After changing the cropping worked perfectly fine.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted