MG 2.2 Any way to modify image code output?

Mike Phillips

New member
Any way to modify image code output?


I have a new Xenforo forum with the Media Gallery add-on. So far I really like the Xenforo software and the Media Gallery except for one thing.

The URL address for a picture, after it's uploaded to the gallery has extra coding on the end of the file name that I would prefer wasn't there.

Here's a screenshot example from this thread,

966 Batmobile - 3D Products - Extreme Makeover!


From post #2

Here's screenshot showing BB Code for image URL addresses. The file name for the first image is

batmobile-008-jpg.358/full

I only want it to be,

batmobile-008-jpg

ExcessiveCodeA.jpg



After uploading to the gallery, the software adds the portion after the .jpg and before the [/img]

ExcessiveCodeB.JPG


I don't want this extra code. I want the image url address to end with the .jpg


It makes it MUCH faster for me to insert hundreds of pictures. Basically after I insert the first picture, all I have to do is run down the end of each line of code and change the image file number.

When the software adds the extra number at the end of the original file name - I then have to change each one of these numbers. It's a pain and time consuming.


Thank you for any help ahead of time.


:)
 

Mike Phillips

New member
Also....

Why does the Media software changes . to 1

I.e. change DOTS to DASHES

In the file names?

I normally name files like this,

Batmobile.001.JPG

The software removes the dots and replaces them with dashes? So I get this?

Batmobile-001-JPG

Is this something that can be adjusted?


:)
 

Chris D

XenForo developer
Staff member
Unfortunately neither of these things can be adjusted and they are a core component of how the URL routing system works.

What specifically concerns you about the URL in its current format?
 

Mike Phillips

New member
What specifically concerns you about the URL in its current format?

Because the software adds an extra set of numbers, when I'm inserting multiple pictures, I have to change both the file number and the number the software adds. It's just annoying.

I'm use to PhotoPost on my other forums and the software adds nothing to the image file name.

The Batmobile thread has around 190 pictures. This means I have to change the image file numbers 380 times. If I was just adding one or two pictures like most people it wouldn't be an issue. But for the last 20+ years I've created a lot of very picture intense threads.

The fastest way is via working in code view with the code.

Here's an example of what I mean. Because I re-name all my images in numerical order in the way I want them to display, once I have the complete code for an image, in code view, all I have to do is copy and paste this string of code the number of times that matches the number of pictures and then simply run through the code and change the end number.

Here's an article I wrote years ago that shows and explains what I'm talking about when working inside vbulletin with images hosted in PhotoPost,,

Note the last digits in the file name.

Editor view of BB code behind multiple pictures


CodeForMultiplePictures002.jpg

If you click this link you can see how the code shows the pictures

1957 Chevy Extreme Makeover - Post #2


If there's no way to fine tune, adjust or tweak the setting to prevent the adding

  1. Numbers
  2. /full
  3. and changing dots to dashes

It's okay, I can do all the extra work, I just thought I would ask.


:)
 

digitalpoint

Well-known member
At the most basic level, the number appended to the end is to ensure uniqueness. For example, in your scenario where you don't want the number on it, how would you want the system to handle two images with the same file name? Say you uploaded an image with the filename, image.jpg... then I come along and upload a different image named image.jpg. You can't guarantee that other users would never upload a file with the same name (you also can't be sure about it being unique within just images from the same user).

So in your perfect world with URLs, how would you suggest handling that if you don't want to assign a unique number to each image?
 

Mike Phillips

New member
So in your perfect world with URLs, how would you suggest handling that if you don't want to assign a unique number to each image?

Valid point.

Me? I rename all my pictures and because I keep copies I can check to see if there's a file name I've already used and then simply modify it.

Because I work in the car world, it is easy to be sharing pictures of similar cars, for example the 1969 Chevelle. But in these situations I simply use different file names. Been doing this for over 20 years, not as long as some, possibly longer than others.

Here's two red/orange Chevelles I detailed and did write-ups for with dozens of pictures. The collection of pictures for each car both have different file names in numerical order. If you "quote" me and look at the code you can see how I named the files. Probably 30, 40 pictures of each car.


Hardtop Chevelle

New_RUPES_0036.JPG


Vinyl Top Chevelle

:)1971_ChevelleRestoRod_040.JPG


Thanks for your insight.


I was hoping there was a tweak that could be implemented before or after the install.


:)
 

digitalpoint

Well-known member
Ya, I mean in theory you could change it up to make the filename be the unique thing about an image, but honestly it's going to be way more work than it's worth. And it also opens up the potential for a lot of problems (accidental as well as malicious). Like what if users thought it was funny to just upload images with the same name you did to overwrite them?

You could do checks and stuff to make sure new images are unique, but eh... it's a LOT of work/aggravation/maintenance to change something that is normally hidden (you don't see the underlying URL when viewing an image).

My vote (not that I have one) would be to leave it as it is because it already works and you don't need to be changing stuff every time something changes in XenForo... and instead use that time/money/energy to work on some other part of your site that would be more impactful for your users.
 
Top