29
votes
Accepted
Access denied security roles on media attach
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 ...
19
votes
Accepted
Better editorial image manipulation tools in Sitecore CMS
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/...
19
votes
How can I safely clear the media cache on a production sitecore CD instance?
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 ...
18
votes
Accepted
How can I safely clear the media cache on a production sitecore CD instance?
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 ...
18
votes
How do you get the link for a media item?
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);
...
17
votes
Accepted
How do you get the link for a media item?
This will also fold in protection for the media request:
var theURL = Sitecore.Resources.Media.MediaManager.GetMediaUrl(mediaItem);
mediaUrl = Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(...
17
votes
How to upload an image programmatically from URL
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 ...
16
votes
Sitecore media ashx not resizing the image (version 7.2)
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 ...
15
votes
Accepted
How to default the media browser to tree view
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....
14
votes
Improve image compression using Dianoga
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, ...
13
votes
Accepted
How do I enforce Alt tags on all images in Sitecore
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
votes
Convert disk based media to database
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 ...
11
votes
Accepted
Optimizing Sitecore Media Items
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 ...
11
votes
Accepted
What is the purpose of shared tenant media folder in SXA?
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 ...
11
votes
Accepted
SPE How to add multiple items to package source
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 ...
10
votes
Optimizing Sitecore Media Items
You could also use this...
https://github.com/kamsar/Dianoga
An automatic image optimizer for the Sitecore media library.
10
votes
Accepted
MediaRequestProtection: An invalid/missing hash value was encountered
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 ...
10
votes
MediaRequestProtection: An invalid/missing hash value was encountered
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 ...
10
votes
Accepted
Unable to see entire Sitecore content tree on selecting any media library item
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
votes
Accepted
Multiple images upload failing in Chrome and Firefox
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 ...
9
votes
Access denied security roles on media attach
Another option is to add the user in question to the Sitecore Client Maintaining role as it already has read access to the upload dialog box. No need to edit security in the core DB with this route.
...
9
votes
Accepted
How to disable caching for specific items in the Media Library?
I would recommend solving this by embracing HTTP caching by changing the Cache-Control to no-cache. The browser will then always check to see if there's a newer/different version but since media items ...
8
votes
Accepted
How do I manage Media library file extensions for SEO purposes?
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 ...
8
votes
Accepted
Sitecore Publishing Service 1.8.0 does not publish blob data for custom field using type Attachment
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-...
8
votes
Accepted
Is there a GetDefaultMediaUrlOptions function?
No, there is not.
mediaProvider definition in Sitecore is limited to
<mediaProvider type="Sitecore.Resources.Media.MediaProvider, Sitecore.Kernel" />
while LinkProvider definition contains ...
8
votes
Access denied security roles on media attach
To be able to attach media, your User should be a member of the Sitecore Role "sitecore\Sitecore Client Maintaining"
8
votes
Accepted
Forcing Sitecore to clear the cache for updated images
Adding a unique URL parameter will force the browser to request the updated image, as mentioned by both the other answers. You'll also face this same issue if you are using a CDN by the way and using ...
8
votes
Accepted
Override Media Manager to Change Url
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 ...
8
votes
Accepted
SXA what is the purpose of the Media folder under a Site
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 ...
8
votes
Uploading zip file to Media Library and enabling "unpacking" results in an error
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, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
media-library × 316sxa × 19
sitecore-client × 19
content-editor × 16
powershell-extensions × 13
mediaurls × 13
caching × 12
azure × 10
sitecore-api × 9
pipelines × 9
experience-editor × 8
links × 8
urls × 8
dianoga × 8
configuration × 7
publishing × 7
security × 7
multilingual × 6
richtext-editor × 6
pdf × 6
content-search × 5
content-management × 5
link-manager × 5
versions × 5
cdn × 5