/// <summary>
        /// Gets the property.
        /// </summary>
        /// <param name="property">The property.</param>
        /// <param name="config">The config.</param>
        /// <param name="context">The context.</param>
        /// <returns></returns>
        public override object GetProperty(Umbraco.Core.Models.Property property, UmbracoPropertyConfiguration config, UmbracoDataMappingContext context)
        {
            if (property == null || property.Value == null)
                return null;

            var mediaService = new MediaService(new RepositoryFactory());
            int id;

            if (!int.TryParse(property.Value.ToString(), out id))
                return null;

            var file = mediaService.GetById(id);

            if (file != null)
            {
                int bytes;
                int.TryParse(file.Properties["umbracoBytes"].Value.ToString(), out bytes);

                var img = new File
                    {
                        Id = file.Id,
                        Name = file.Name,
                        Src = file.Properties["umbracoFile"].Value.ToString(),
                        Extension = file.Properties["umbracoExtension"].Value.ToString(),
                        Size = bytes
                    };
                return img;
            }

            return null;
        }
        /// <summary>
        /// Gets the property.
        /// </summary>
        /// <param name="property">The property.</param>
        /// <param name="config">The config.</param>
        /// <param name="context">The context.</param>
        /// <returns></returns>
        public override object GetProperty(Umbraco.Core.Models.Property property, UmbracoPropertyConfiguration config, UmbracoDataMappingContext context)
        {
            if (property == null)
            {
                return(null);
            }

            var mediaService = new MediaService(new RepositoryFactory());
            int id;

            if (!int.TryParse(property.Value.ToString(), out id))
            {
                return(null);
            }

            var file = mediaService.GetById(id);

            if (file != null)
            {
                int bytes;
                int.TryParse(file.Properties["umbracoBytes"].Value.ToString(), out bytes);

                var img = new File
                {
                    Id        = file.Id,
                    Name      = file.Name,
                    Src       = file.Properties["umbracoFile"].Value.ToString(),
                    Extension = file.Properties["umbracoExtension"].Value.ToString(),
                    Size      = bytes
                };
                return(img);
            }

            return(null);
        }