1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MG 1.1 Change media gallery picture

Discussion in 'Media Gallery Support' started by zastavra, May 4, 2016.

  1. zastavra

    zastavra Formally Stevez

    Is there any way to change the picture in a media webpage or you have to delete that media and create a new one with the new photo? The main reason that I need to know that is because I don't want to lose the back links to the media page, just because I want to change the picture.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    You do have to delete the image, but you would be able to handle the redirection fairly easily. You could of course do server side redirects, but an alternative method is to use the Route Filters system.

    All you need to know is the old media ID and the new media ID.

    Let's say you want to redirect the photo that has a media ID of 123 to the photo that has a media ID of 124:

    Admin CP > Route Filters > Create Route Filter

    Find route: xengallery/{name:string}.124/
    Replace with: media/{name:string}.123/

    "Incoming URL conversion only" should be checked

    This actually seems backwards, but it's correct. Visiting the old picture will redirect you to the new picture.
     
    zastavra likes this.
  3. zastavra

    zastavra Formally Stevez

    Thank you Chris.
     

Share This Page