Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Liam Dilley 153 posts 379 karma points
    Oct 03, 2023 @ 01:40
    Liam Dilley
    0

    Media SEO Friendly URL's

    Hi All, Been thinking on this for a while and it does annoy me.

    How media works is 100% fine with me, Lots of great stuff. The Rendered URL though has always bothered me.

    /media/tq5ccnaa/placeholder.png

    It is the middle ID bit that is the main issue. While it does not 100% harm SEO when you are working along side your SEO and marketing teams friendly URL's and structures matter a lot.

    Further to this being able to link to an image directly happens be it for internal or external use. Media ID's change though if an item is deleted by mistake or between different environments.

    In some other platforms you get a machine or "permanent" URL but you are also offered up the more SEO friendly URL as well.

    /media/tq5ccnaa/placeholder.png /media/placeholder.png

    Would be great. It would be awesome if this became a native feature in Umbraco but I have also wondered if it was possible to build this in with an extension? Would this be possible?

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    Oct 13, 2023 @ 15:45
    Huw Reddick
    0

    how would you deal with non unique filenames in this situation?

    /media/tq5ccnaa/placeholder.png

    /media/tq5xxnyy/placeholder.png

  • Liam Dilley 153 posts 379 karma points
    Oct 15, 2023 @ 23:04
    Liam Dilley
    0

    This is not a unique feature request. Several platforms have machine or permanent URL's and then the friendly version as well.

    Your not creating new files. You would never have this:

    /media/tq5ccnaa/placeholder.png /media/tq5xxnyy/placeholder.png

    You have a URL Alias representing the file with friendly URL...

    /media/placeholder.png

    And in cases where this may have the same or on some platforms with multiple files (which is not the best way) The _1 or 1 on the end occurs, just as it does on an OS etc.

    /media/placeholder.png /media/placeholder_1.png

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    Oct 16, 2023 @ 08:14
    Huw Reddick
    0

    You could write your own content finder https://docs.umbraco.com/umbraco-cms/reference/routing/request-pipeline/icontentfinder but would also maybe need a UrlProvider as well )unsure if this works for media ) https://docs.umbraco.com/umbraco-cms/reference/routing/request-pipeline/outbound-pipeline=

  • Liam Dilley 153 posts 379 karma points
    Oct 16, 2023 @ 23:01
    Liam Dilley
    0

    Your missing the point. You should not and would not want to have code finding a media item. There are plenty of default options for that provided in Umbraco.

  • Huw Reddick 1741 posts 6104 karma points MVP c-trib
    Oct 17, 2023 @ 08:06
    Huw Reddick
    0

    I believe for a new site you can do this by setting the below in your startup, this then uses the v7 way of storing media

    builder.Services.AddUnique<IMediaPathScheme, OriginalMediaPathScheme>();
    
Please Sign in or register to post replies

Write your reply to:

Draft