19

Since it has been more than a month after you asked this question, you may have already resolved this issue. However I would post the answer here for future reference. Short answer is that, Attach tries to open the 'Upload' dialog box. To resolve the issue, you need to give 'read' access to sitecore/content/Applications/Dialogs/Upload in the core database. ...


18

We had exactly this problem to solve on the current project that I'm working on. I wanted to use something like this for Umbraco which allows you to set a focus point: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper However unfortunately despite looking extensively I couldn't find ...


18

Getting the URL of a MediaItem is pretty straightforward, you pass the MediaItem reference to Sitecore.Resources.Media.MediaManager.GetMediaUrl: var url = MediaManager.GetMediaUrl(mediaItem); GetMediaUrl takes an optional second parameter of Sitecore.Resources.Media.MediaUrlOptions, which can be used to add query string parameters to the URL which are ...


17

Other option is to delete from time to time media cache using an schedule agent. Current value is 24 days but if you need to clear more ofen just decrease max age parameter of the last setting (see below settings). It is not recommended to clear media cache very often because you will have some performance impact. <agent type="Sitecore.Tasks....


17

There are a couple of steps involved. Download the image from the url via a WebRequest Copy the download stream to a MemoryStream Set up a MediaCreator Configure MediaCreatorOptions Create the MediaItem Optionally you also need to consider the context Database and permissions. In this example I am just uploading to "web" and ignoring security. You will ...


16

This will also fold in protection for the media request: var theURL = Sitecore.Resources.Media.MediaManager.GetMediaUrl(mediaItem); mediaUrl = Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(theURL); Here is the link to Sitecore documentation that explains about protecting Sitecore media from abuse - https://doc.sitecore.net/...


16

As of Sitecore 7.5+ (applies to the latest 7.2 versions as well), Sitecore introduced a media request protection for image resizing (to make sure an attacker can't overload your server with image resize requests) In this case you have two options: Add a media hash to the resizing requests, like that: Sitecore.Resources.Media.HashingUtils....


15

It is completely safe to just delete the folder /App_data/MediaCache without causing disruption. The minute an image gets called up again, it will be cached again, so no worries about the functionality of your website. We make sure it get's cleaned up every week. In addition you can set up a clean up job to do the work for you. Unfortunately the usage of /...


15

In Sitecore 7.1-7.5 there is a configuration file called Sitecore.Speak.config in the include folder. In that file find the following line: <override xmlControl="Sitecore.Shell.Applications.Media.MediaBrowser" with="/sitecore/client/Sitecore/Common/Dialogs/SelectMediaDialog" /> And replace it with this <override xmlControl="Sitecore.Shell....


13

You are able to set the required validation item rule item to FATAL ERROR in Sitecore. This is the highest level of validation. This setting prevent the user to save the item with validation error.


12

Your comparison of Dianoga with the other tools isn't quite fair- though what you found is accurate. A few things to point out: Dianoga is lossless compression, which means as the size is reduced, the image should look identical from the version before it was run through the algorithm Sitecore only applies the quality setting to an image if you include ...


11

You've got a few options: The Simple Option: Add a width (see here: Sitecore Image Parameters) - the image sizes will be processed. The disadvantage of this approach is that you get a processing hit the first time the image is resized (it then caches the result I believe). A more complex option: You can build something which farms the images out to a CDN ...


11

sitecore/media library/Project/New tenant - this is media folder created for your project. In this example your project is called "New tenant" sitecore/media library/Project/New tenant/shared media folder an be used when you have more then one site in the tenant. While using it you can share media across all of the pages within that tenant.


10

You could also use this... https://github.com/kamsar/Dianoga An automatic image optimizer for the Sitecore media library.


10

It usually means that a Url for a media asset is missing the Hash query string parameter when being called. This was introduced in v7.5. It attempts to fix an image resize vunerability where you could potentially fill a disk with different image sizes. If you use a FieldRenderer you will get a valid url with the Hash query string appended. If you just ...


10

You have a few good options. Module: You were probably looking for this. https://marketplace.sitecore.net/en/Modules/Media_Conversion_Tool.aspx Custom Code I would convert the code in this article to a script in Sitecore PowerShell Extensions since you can both run the existing report for finding them plus run the conversion. Actually sounds like a nice ...


10

Click on the Sitecore Icon present on the top left in Content Editor then navigate to: Application options ▶ View(2nd tab) ▶ Check the Show Entire Content Tree check box.


9

I saw this behavior when you have a firewall, antivirus or cookies are corrupted. Somehow Please try to delete all your cookies and try again. Cookie with key : sc_fv contains Flash Version and probably somehow this one was corrupted. On the method Sitecore.Shell.Framework.Commands.Media.MultiUpload.QueryState(CommandContext context) is verifying method ...


9

The script we use to bundle up SPE can be found here: /sitecore/system/Modules/PowerShell/Script Library/Platform/Development/PowerShell Extensions Maintenance/Prepare Console Distribution. From the documentation here: Creates new Item source that can be added to a Sitecore package. Item provided to it is added as well as its subitems. New-ItemSource ...


8

Loooong time ago I wrote a blog post describing how to handle this issue. It was for Sitecore 6.5 but I guess it should work on any other version as well. Sitecore serves media items even with incorrect extensions The idea is that there is an extra processor added to httpRequestBegin pipeline which checks whether the extension used in requested url is same ...


8

Yes. Likely your solution is not generating protected Media Urls. Used to be: var mediaUrl = Sitecore.Resources.Media.MediaManager.GetMediaUrl(mediaItem) Was enough. But to protect against XSS attacks, these should now be protected. Like this: mediaUrl = Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(mediaUrl) Which should make the log warnings go ...


8

No, there is not. mediaProvider definition in Sitecore is limited to <mediaProvider type="Sitecore.Resources.Media.MediaProvider, Sitecore.Kernel" /> while LinkProvider definition contains lot of properties which are used as default options: <add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="false" ...


8

You need register the new Media Manager using Sitecore Dependency Injection (see 'Registration in code' chapter). It can be done via Service Configurator as described in the article. Creating Service Configurator Implement Sitecore.DependencyInjection.IServicesConfigurator interface from Kernel assembly. Please note that you need to reference Microsoft ...


8

Media Library scope for site Every dialog where you have to select media item will be scoped to Media (Virtual Media Folder) So first and very important role is to scope which part of Media Library is available for editors on the current site (you will set this up using Additional Children field), see image below Easy upload/quick access In fact, this is ...


8

This is a problem with zip archives generated on Macs. Sitecore zipping mechanis doesn't work well with zip archives containing __MACOSX folder. As a workaround you can unzip your archive on PC, remove __MACOSX folder and zip your files again. I've tried to look for possible fix for the issue long time ago, but it would require changing multiple Sitecore ...


7

I did some digging: Sitecore has a mechanism to ensure the validity of dynamically scaled media requests. Read more about this here: https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/security_hardening/configuring/protect_media_request One should use Sitecore controls (sc:image) for rendering media or use a pattern of Sitecore....


7

By default, the publishing service will publish Blobs if they are created/referenced by the following fields: /sitecore/templates/System/Media/Versioned/File/Media/Blob Guid = {DBBE7D99-1388-4357-BB34-AD71EDF18ED3} /sitecore/templates/System/Media/Unversioned/File/Media/Blob Guid = {40E50ED9-BA07-4702-992E-A912738D32DC} In case of you defined your own ...


7

It looks like your problem is the 1x being before the hash parameter - that part doesn't need to be included in the hash. Try changing to this: <img class="callout-grid__image" srcset="@Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(string.Format("{0}?w=300", Model.GlassModel.CalloutImage.Src)) 1x, @Sitecore.Resources.Media....


7

Out of the box, you cannot prevent this. It's just the way the RTE works in Sitecore. Fortunately you can work around this issue, but it's a fairly involved process. It involves: Parsing the RTE html for <img> elements with a style attribute, then removing width and height Optionally hooking into the Sitecore renderField pipeline and run the above ...


7

There are a couple good ways to do this Provide a different interface when the page is in edit mode. Image with retina/non-retina support using Glass: @if (Sitecore.Context.PageMode.IsExperienceEditorEditing) { <div class="container-fluid" style="width: 100%;"> <h3>Logo Images</h3> <div class="col-sm-6"> ...


Only top voted, non community-wiki answers of a minimum length are eligible