1. Default Background Color  Sitecore All about images
  2. Disable upload media as file Sitecore All about images : Part 2
  3. New security Hash in media

 

After Sitecore version 7.5, Sitecore has come up with the security feature for the images on the website. For earlier version of Sitecore, we can just add some parameters in the URL and get the different size, different background image. It was a really great feature but some of the site complained that people are using their images on different sites and that creates issue on Servers.

What is the new feature?

Sitecore has included a file Website\App_Config\Include\Sitecore.Media.RequestProtection.config

This file contains multiple settings related to Media Request Parameters and Request Protection.

<!– MEDIA – REQUEST PROTECTION – ENABLED
Specifies whether media request protection is enabled or not.
Default value: true
–>
<setting name=”Media.RequestProtection.Enabled” value=”true” />

When this setting is enabled, Sitecore will parse the request and will add a hash code for all the Parameters we have passed. If we pass any additional parameters directly in the URL then it will fail and Sitecore will return original unchanged image.

If you want to generate the Image links due to some reason then Sitecore has provided a Tool out of the box.

You can visit the tool in below folder in your Sitecore site.

http://SitecoreSite/sitecore/admin/mediahash.aspx

Insert the media URL and click on the “Generate hash”

http://SitecoreSite/-/media/Default%20Website/sc_logo.ashx?w=400&h=100&hash=443FF4A7B69D44133****FFAF275FD69957F1975

Open the /App_Config/Include/Sitecore.Media.RequestProtection.config file and change the Media.RequestProtection.SharedSecret setting to a random string

Found this from below link:

https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/security_hardening/configuring/protect_media_request

Advertisements