/// <summary>
        /// Private backer used by the other addMedia calls
        /// </summary>
        /// <param name="URL">URL path to the image to insert</param>
        /// <param name="Name">Name to use for the image</param>
        /// <param name="alt">Alt text to use for the image</param>
        /// <returns>GUID of the new image</returns>
        private static Item addMedia(string URL, string Name, string alt = "")
        {
            try
            {
                using (new SecurityDisabler())
                {
                    Sitecore.Resources.Media.MediaCreatorOptions options = new Sitecore.Resources.Media.MediaCreatorOptions();

                    options.Database  = Sitecore.Configuration.Factory.GetDatabase("master");
                    options.Language  = Sitecore.Globalization.Language.Parse(Sitecore.Configuration.Settings.DefaultLanguage);
                    options.Versioned = false;
                    Item mediaFolder = Sitecore.Context.Database.GetItem("{42DFBB81-6182-4EB4-BC28-D6EF535D84F3}");
                    options.Destination = string.Format("{0}/{1}", mediaFolder.Paths.FullPath, Name);
                    options.FileBased   = Sitecore.Configuration.Settings.Media.UploadAsFiles;

                    foreach (Item i in Sitecore.Data.Database.GetDatabase("master").SelectItems("/sitecore/Media Library/Common Sense Media Folder//*[@@templatename='Image'or @@templatename='Jpeg']"))
                    {
                        if (i.Fields["title"].ToString() == Name)
                        {
                            return(i);
                        }
                    }

                    MediaCreator creator = new MediaCreator();
                    MediaItem    image   = creator.CreateFromStream(getStream(URL), Name + getExtension(URL), options);

                    image.InnerItem.Editing.BeginEdit();

                    image.InnerItem["title"] = Name;
                    image.InnerItem["alt"]   = !string.IsNullOrEmpty(alt) ? alt : Name;

                    image.InnerItem.Editing.EndEdit();

                    PublishItem(image, options.Database);
                    PublishItem(image, Sitecore.Configuration.Factory.GetDatabase("web"));

                    return(image.InnerItem);
                }
            }
            catch (Exception e)
            {
                return(null);
            }
        }
        /// <summary>
        /// Private backer used by the other addMedia calls
        /// </summary>
        /// <param name="URL">URL path to the image to insert</param>
        /// <param name="Name">Name to use for the image</param>
        /// <param name="alt">Alt text to use for the image</param>
        /// <returns>GUID of the new image</returns>
        private static Item addMedia(string URL, string Name, string alt = "")
        {
            try
            {
                using (new SecurityDisabler())
                {
                    Sitecore.Resources.Media.MediaCreatorOptions options = new Sitecore.Resources.Media.MediaCreatorOptions();

                    options.Database = Sitecore.Configuration.Factory.GetDatabase("master");
                    options.Language = Sitecore.Globalization.Language.Parse(Sitecore.Configuration.Settings.DefaultLanguage);
                    options.Versioned = false;
                    Item mediaFolder = Sitecore.Context.Database.GetItem("{42DFBB81-6182-4EB4-BC28-D6EF535D84F3}");
                    options.Destination = string.Format("{0}/{1}", mediaFolder.Paths.FullPath, Name);
                    options.FileBased = Sitecore.Configuration.Settings.Media.UploadAsFiles;

                    foreach (Item i in Sitecore.Data.Database.GetDatabase("master").SelectItems("/sitecore/Media Library/Common Sense Media Folder//*[@@templatename='Image'or @@templatename='Jpeg']"))
                    {
                        if (i.Fields["title"].ToString() == Name)
                        {
                            return i;
                        }
                    }

                    MediaCreator creator = new MediaCreator();
                    MediaItem image = creator.CreateFromStream(getStream(URL), Name + getExtension(URL), options);

                    image.InnerItem.Editing.BeginEdit();

                    image.InnerItem["title"] = Name;
                    image.InnerItem["alt"] = !string.IsNullOrEmpty(alt) ? alt : Name;

                    image.InnerItem.Editing.EndEdit();

                    PublishItem(image, options.Database);
                    PublishItem(image, Sitecore.Configuration.Factory.GetDatabase("web"));

                    return image.InnerItem;
                }
            }
            catch (Exception e)
            {
                return null;
            }
        }