Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Preetee Gangoosirdar 56 posts 257 karma points
    Nov 15, 2016 @ 12:30
    Preetee Gangoosirdar
    0

    image cropped url querystrings cause bad rating on GTmetrix

    Hi all,

    Wondering if there is a way to encode the parameters into the file names as ImageGen does with it's cropped image.With the new image cropper property editor that is available in umbraco 7, when an image is cropped this generate a quite long querystring . Due that querystring on static images ,GTmetrix gives a bad rating and request to remove Remove query strings from static resources

    e.g http://www.test.com/media/17203/myt.jpg?center=0.54333333333333333,0.50222222222222224&mode=crop&width=500&height=312&rnd=131111709710000000 ==> http://www.test.com/media/17203/myt_thumbnail.jpg

    @foreach (var img in folder.Children("Image").OrderBy("SortOrder")){
           var imageNode = @Umbraco.TypedMedia(@img.Id);                                
        <div class="cbp-slider-item cbp-slider-item--active">
            <a href="@img.umbracoFile" class="cbp-singlePageInline" data-title="@heading">
                <img src="@Url.GetCropUrl(@Umbraco.TypedMedia((int)img.Id),"umbracoFile","_thumbnail")" height="312" alt="@heading"  />
            </a>
        </div> }
    

    Thanks you for your kind helps and responses.

Please Sign in or register to post replies

Write your reply to:

Draft