Friday, March 22, 2019 11:11:06 PM

Full size image of the article

10 months ago
#8188 Quote
I would like to display full size image of the article in view ArticleTemplate.Default, how can I get the imageurl?

I managed to display only the thumb width:200

Thanks
10 months ago
#8189 Quote
You can do it.
Example
Model.PictureModel.FullSizeImageUrl

Old code
        Html.AddHeadCustomParts("<meta property=\"og:image\" content=\"" + Model.PictureModel.ImageUrl + "\" />");

New code
        Html.AddHeadCustomParts("<meta property=\"og:image\" content=\"" + Model.PictureModel.FullSizeImageUrl + "\" />");

ArticleModel has element PictureModel


namespace Nop.Web.Models.Media
{
    public class PictureModel : BaseNopModel
    {
        public PictureModel();

        public string ImageUrl { get; set; }
        public string ThumbImageUrl { get; set; }
        public string FullSizeImageUrl { get; set; }
        public string Title { get; set; }
        public string AlternateText { get; set; }
    }
}