Store Direct Path when using Media Selection Control

Farrah Chavez asked on December 17, 2020 02:58

Hi,

We're using the Media selection control to allow users to upload images into the pages. Client prefers all the images to be reusable and accessed via the media library.

We've set this up and found that when we access the field, it gives the permanent URL (/getmedia/{GUID}) to the image instead of the direct URL (/{site-name}/media/{library-name}}. For SEO purposes, it's preferable that we use the direct, readable URL.

I've done my research and found this old thread. It mentions disabling Use permanent URLs under Site Manager -> Settings -> Media libraries. But I just can't find this setting.

I checked the official docs to see if it's a real setting and sure enough, it's mentioned.. up until Kentico 12. The page header mentions "This page is only available for the Portal Engine development model"

We've upgraded our website to Kentico 13 so I'm guessing that's why I can't find that setting.

  1. Is there a way to disable the use of permanent URLs?
  2. If not, is it possible to store the direct URL to the database instead of the permanent URL when using the Media selection control?

Would really appreciate any guidance!

Correct Answer

Juraj Ondrus answered on December 17, 2020 10:42

There was a bug which was fixed in hotfix no.5:

Media library - Adding media files to content with direct file path URLs
The hotfix allows media libraries to use the direct file path in URLs when adding links to files in Xperience content (instead of permanent media file URLs). For example, direct file URLs may be desired for media files placed in external storage, such as Microsoft Azure Blob storage. The option can be configured when editing individual media libraries on the 'General' tab. The configured URL format applies when adding links to media files in the rich text editor (using the page builder widget or when editing rich text page fields) and via page fields based on the 'Media selection' form control.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Farrah Chavez answered on December 17, 2020 10:53

I should have checked the hotfixes. Thank you Juraj!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.