View Full Version : Resized image storage path and file name
February 10th, 2013, 08:59 PM
Hi there - I guess at some point the storage path/naming for resized images changed..
Medium resized images apparently used to be saved as:
Now they are saved as:
Thus all the old image links are broken. I think this affects thumbnail links too..?
Thanks for any suggestions to correct this!
February 10th, 2013, 10:26 PM
files have not been saved like that for like 7 to almost 8 years. I really do not know anything I could tell you that would help you because your talking about links outside this program I am going to assume. Not much we can do outside what we have control over.
February 11th, 2013, 10:54 AM
If your talking about post links in vb and I understand what your asking this is some trickery that might help you if your doing links in the vb forum.
You will want to make sure you have mysql backups and do understand anything you do on this issue is outside our support parameters. My comments 8 years ago are posted to assist someone who wanted to change urls in his forum posts.
I am a bit surprised after all these years to see someone who is using a pre version 5 piece of the software. That's a long time without upgrading.
February 11th, 2013, 06:49 PM
I'm using a current version of photopost. What I'm referring to is that under an old version the software stored images differently. So when people linked images from my photopost gallery back then they used the previous naming convention. Then photopost changed and thus image links posted in say a message forum thread from before the change are now broken links.
This has two negative consequences:
1. The images in the post are broken, generally making the post worthless, such as the case with the DIY project the images above were for. I'd post a link to the thread but apparently I'm not allowed to since I don't have 15 posts here. It doesn't really matter as I'm sure you know what I mean. This means a lot of my old "long tail" content is broken.
2. It fills up my apache error log file with file not found error messages, even these old threads are found via search and web crawlers. And they're not even all from my site - people link images from other sites, so even if I run some sort of query to update the threads on my site it won't stop the invalid requests from other sites linking those images.
I've noticed the invalid requests in my apache log file for a long time but previously assumed they were pictures people had deleted from their personal gallery after they had been linked.
Likewise I've seen plenty of broken image links in old threads, but most were linked from other sites. I'd seen that some were photopost links from my own site but again figured they were images people had since deleted from their gallery.In looking into one case I found that the images were actually there, they were just being stored with a new path/name schema.
I guess it changed a long time ago and I just now figured out what happened. I can't be the only one in this situation so I was hoping there was some way to address it.
February 11th, 2013, 07:00 PM
I have responded to this here and even in that thread almost 8 year old thread.
The point I made then is still valid 8 years later. We only have control over what is outside our code. The images show fine on our gallery.
We have no control over what a person posts on another site or somewhere outside our application etc. Like for instance I would like to think if someone was discussing a photo that was posted somewhere else they would post the actual url to that photo so someone could click the url and go visit the photo.
8 years ago we changed how photos where stored because quite frankly a directory has a physical limit of say around 65000 files. That means roughly because 8 years ago all photo sizes where stored in one directory that you had a limit of 21000 images in a category.
I posted something you could try in vbulletin but thats all I can do is post an idea. There is no real foolproof solution to something outside our control for everyone.
This is what is in the thread I posted
PLEASE NOTE YOU DO THIS AT YOUR OWN RISK AS THIS IS POWERFUL QUERY
EXAMPLES BELOW make sure to add your table prefix but here is an example of both query types
UPDATE post SET pagetext = REPLACE(pagetext, '-med','')
You need to do the above query ONCE only.
The one below you would need run the following below and then change 500 to any other category id numbers your install has.
UPDATE post SET pagetext = REPLACE(pagetext, '/data/500/','/data/500/medium/')
That should update any file linked url to the new structure and naming convention.
A little bit of work and make sure to backup your database before playing. We do not support or accept any responsibilities for anything you do. You do this at your own risk as noted.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.