Fix Broken Image Links | Easy Fixes for Website Images

  • Thread starter ghwellsjr
  • Start date
In summary, there is a bug involving the image proxy system and redirecting old attachment URLs to new ones. This causes images to not display correctly in posts, but they can be seen correctly in the edit window. The forum developers are working on a solution to this issue.
  • #1
ghwellsjr
Science Advisor
Gold Member
5,122
150
Are you going to fix them?
 
Physics news on Phys.org
  • #2
Can you show me an example? If people are posting links to broken images, we can't control that.
 
  • #4
What's interesting is that if you click on the link in the previous post, you won't see the images but if you then click on the Quote button, you will see the images correctly in the reply window.
 
  • #5
ghwellsjr said:
What's interesting is that if you click on the link in the previous post, you won't see the images but if you then click on the Quote button, you will see the images correctly in the reply window.
I think there is a bug involving the image proxy system and the redirect. You are linking to an attachment using the old URL. This is being redirected to the new URL but the image proxy might be messing it up. I'll have to talk to the devs.
 
  • #6
In addition to old links that used to work before the new software, I cannot get a new image to work. It appears correctly in the edit window but in the preview window I see a button that says "View attachment 12345". When I click on the button, I get an error message saying, "You do not have permission to view this page or perform this action." I suspect your developers have the permission and so they don't see the problems I am describing.

Here, let me upload and image:

1LYin2Years1.PNG


Right now, while I'm editing this post, I can see the image. But if I click the PREVIEW... button I see a button that says, "View attachment 73532" in place of the image. Now I'm going to POST REPLY and see what happens.
 
  • #7
Well, it does display the image correctly, but it shouldn't give me all this confusion during editing of a post. And the original problem persists. Your developers should not be having a challenge to fix this problem. As I said, in a post where the images are broken, I can click on Quote and the images appear correctly.
 
  • #8
  • #9
ghwellsjr said:
How hard can this be to fix?
I fixed it for you. If you edit the post and switch to bbcode editor you'll see your linking the images to the old attachment URL. You need to reinsert them and the system will use the new attachment URL.
 
  • #10
This problem persists for all posts. I have uploaded hundreds of diagrams. I cannot edit the posts. Here's one of my first:

https://www.physicsforums.com/threads/triplet-paradox.644948/page-4#post-4183723

Can you explain to me why the system can't display the images on the above link but if you click on Reply, it can? If the new system is able to link to the old attachment URL in the Reply window, why can't it link to the old attachment URL in the post?
 
  • #11
ghwellsjr said:
This problem persists for all posts. I have uploaded hundreds of diagrams.

Looks that the differences between the old system and new system somehow break the way old attachments are displayed, and it is not only a problem with your posts. That means it may require a forum-wide changes - please wait a few days as Greag is working through the 2do list. Be sure we want all these images to display correctly :)
 
  • #12
Borek said:
Be sure we want all these images to display correctly :)
Thanks, that's what I wanted to hear.
 
  • #13
Borek said:
Looks that the differences between the old system and new system somehow break the way old attachments are displayed, and it is not only a problem with your posts. That means it may require a forum-wide changes - please wait a few days as Greag is working through the 2do list. Be sure we want all these images to display correctly :)
It's been 10 days now, how far up on the 2do list has this problem gotten?

Click on this link to see the problem:

https://www.physicsforums.com/threads/triplet-paradox.644948/page-4#post-4183723

Let me re-iterate, if you click on the above link, you can see the images displayed correctly in the thumbnails at the bottom of the page and if you click on "Reply", the full-size images will be displayed correctly in the edit window. I don't see why this problem is taking so long to get fixed.
 
  • #14
ghwellsjr said:
I don't see why this problem is taking so long to get fixed.
The problem is that we are using SSL, because we are using SSL we have to use a image proxy. At the moment the image proxy will only cache publicly viewable images. Because the images in your posts were added via an image tag using the private attachment url, they are not publicly accessible. I am still trying to work on a reasonable solution.
 
  • #15
I used PF's upload and image display features. The images are not on some other URL. Did you click on the Replay button after going to the example page I linked to? If the images display correctly in the edit window, why can't they be displayed correctly in the post? It doesn't make any sense to me.
 
  • #16
ghwellsjr said:
If the images display correctly in the edit window, why can't they be displayed correctly in the post? It doesn't make any sense to me.
I am assuming the edit window doesn't engage the image proxy. What doesn't make any sense to you?
 
  • #17
It doesn't make sense to me that you have two windows that are taking exactly the same source from your database, one of them does not display the image (it puts a big X in place of the image) and the other one does display the image correctly. Why can't your developers look at how the edit window correctly displays the images and do the same thing in the post?
 
  • #18
ghwellsjr said:
Why can't your developers look at how the edit window correctly displays the images and do the same thing in the post?
The purpose of the image proxy is that because we are using SSL, everything loaded on a page within our domain must come from a secure location as well. Most image hosts are not secure. If you load insecure elements to a supposedly secure website you'll receive browser warnings. The image proxy caches the image on our server from which it will now load from. It must come from a publicly accessible location. The attachment system is not public.

The edit window is ajax loaded and not public so there isn't a need to load the image proxy into it. I agree it's confusing, but that is the way it is.

As I said, I am searching for a solution for your case.
 
  • #19
I can understand your explanation if my images were uploaded to an insecure image host, but they are uploaded to PF's image host. Are you saying that your own image host is insecure?
 
  • #20
ghwellsjr said:
Are you saying that your own image host is insecure?
It's secure, but it's not public
 
  • #21
Why do you permit the thumbnail of an image to be displayed at the bottom of the post but not the image?
 
  • #22
ghwellsjr - please understand it is not "us". We use a generic forum software made by someone else (www.xenforo.com). Apparently it has some quirks, and Greg is doing his best to both report problems to the developers and to correct them here.
 
  • #23
ghwellsjr said:
Why do you permit the thumbnail of an image to be displayed at the bottom of the post but not the image?
That is using the attachment system. Once you use the image bbcode tag it invokes the image proxy system.
 
  • #24
Greg Bernhardt said:
That is using the attachment system. Once you use the image bbcode tag it invokes the image proxy system.
Why can't a similar thing be done with the full-size images?
 
  • #25
ghwellsjr said:
Why do you permit the thumbnail of an image to be displayed at the bottom of the post but not the image?
Greg Bernhardt said:
That is using the attachment system. Once you use the image bbcode tag it invokes the image proxy system.
ghwellsjr said:
Why can't a similar thing be done with the full-size images?
If I'm following all of Greg's previous replies, the reasons are:
1) The full-size images were uploaded using a PF feature designed for attachments.
2) The attachment URLs were then edited into posts using bbcode images.
3) Images in the post are displayed by the forum code. (Xenforo)
4) Xenforo requires an image proxy server to retrieve the image for display in the post.
5) The image proxy must be on a public server.
6) The attachment server at PF is not a public server.
7 ) Greg can't change the code that retrieves/displays the image in the post - only Xenforo.
8) The attachment system (thumbnail display) does not have this limitation. That is why the thumbnails display properly (as intended).

So I think what Greg is up against (or caught in between) is to move all of these images to a new server with new location names and somehow translate all of the original URLS of the images to the new ones. Easy to say, yet it must be complicated or impossible, or Greg would have addressed it for you (and everyone else) by now.

I mention everyone else, as I recently discoved the PF Member photo thread, and there are many photos in a similar predicament. I'm certain this is important to Greg and all.
 
  • #26
ghwellsjr said:
Why can't a similar thing be done with the full-size images?
Do what similar thing? The proxy is a public system. The attachment system is private. You can't blend the two together. You can see the images in the edit window because you are logged in. The attachment system uses your private permissions. The proxy does not. The image must be publicly accessible.

TumblingDice said:
translate all of the original URLS of the images to the new ones
I have looked into this but it's near impossible because the attachment links are dynamically rewritten. I can't just do a regular expression to translate.

TumblingDice said:
I mention everyone else, as I recently discoved the PF Member photo thread, and there are many photos in a similar predicament. I'm certain this is important to Greg and all.
I looked and most of those are straight broken images which don't exist on the external servers any longer.
 
  • #27
TumblingDice said:
...translate all of the original URLS of the images to the new ones
Greg Bernhardt said:
I have looked into this but it's near impossible because the attachment links are dynamically rewritten. I can't just do a regular expression to translate.
I entertained this possibility, recalling how you phrased an earlier post. That was the reason for my "or impossible" reference to help on the user-friendly side. (Maybe I could have used a balloon analogy...Nah!)
 
  • #28
Greg Bernhardt said:
ghwellsjr said:
Why can't a similar thing be done with the full-size images?
Do what similar thing? The proxy is a public system. The attachment system is private. You can't blend the two together. You can see the images in the edit window because you are logged in. The attachment system uses your private permissions. The proxy does not. The image must be publicly accessible.
I wasn't asking about the edit window, I was asking about the thumbnails.

I logged off of PF so it couldn't use my permissions and went to a post that has one of my images. I could not see the full size image in the post but at the bottom of the post, I could see a thumbnail of the image. My questions is: why can't whatever is done to display the thumbnail be done to display the full size image?
 
  • #29
ghwellsjr said:
why can't whatever is done to display the thumbnail be done to display the full size image?
Thumbnails are public. You seem to not be understanding that attachments are not public, they require permissions to access. The Image proxy by design needs a publicly accessible image to cache.
 
  • #30
When I posted the images, I did not do anything to make the thumbnails and I did not do anything to make them appear at the bottom of the post, somehow they got made from my full size images. It sounds like you are saying that at the time I uploaded the images to PF, the old PF software put my full size image in a private place and created the thumbnails at the same time and put them in a public space. I guess what you are saying is that the full size images reside with the old server and the new server isn't programmed to access them, correct?
 
  • #31
Can you please change the maximum number of images per post from 5 back to 6 like the old software had? Otherwise, when you fix the broken link problem, there will still be a problem for those posts that have 6 images in them and there are plenty of them.

By the way, how's the broken link fix coming along?
 
  • #32
ghwellsjr said:
Can you please change the maximum number of images per post from 5 back to 6 like the old software had?
It is now set to 6. There is nothing to fix. Images must be hosted in a public area if your going to use the img tags.
 

1. How do I know if my image links are broken?

One way to check if your image links are broken is to manually click on each image and see if it loads properly. Another way is to use a website crawler tool to scan your website for broken links.

2. What causes image links to break?

Image links can break due to various reasons such as the image being deleted or moved, the website URL being changed, or the image file being corrupted.

3. Can broken image links affect my website's performance?

Yes, broken image links can negatively impact your website's performance. They can lead to a poor user experience, decrease in website traffic, and affect your search engine rankings.

4. How can I fix broken image links?

One way to fix broken image links is to manually update the image links with the correct URL. Another option is to use a plugin or tool that automatically fixes broken image links on your website.

5. How can I prevent image links from breaking in the future?

To prevent image links from breaking in the future, it is important to regularly check for broken links and fix them promptly. Additionally, avoid changing image file names or locations and use relative image links instead of absolute ones.

Similar threads

Replies
2
Views
843
  • Feedback and Announcements
Replies
3
Views
783
  • Feedback and Announcements
Replies
4
Views
1K
Replies
1
Views
328
Replies
13
Views
2K
  • Feedback and Announcements
3
Replies
91
Views
4K
  • Programming and Computer Science
Replies
11
Views
1K
  • Optics
Replies
5
Views
1K
  • Feedback and Announcements
Replies
2
Views
1K
Back
Top