DRE
Well-known member
Can someone create an addon that removes broke images and just replaces them with the url (but not as an embedded link)? Got this idea from a post in the MetaMirror thread by @HWS
I'm using nowhere near my bandwidth limit anyway plus I'm using a CDN.To do that you would pretty much have to CURL the url of the images and check the response codes which could significantly slow down your page load (not to mention eat up your bandwidth).
Are you posting this for me or another developer because I have no idea what that is or how it can applied to Xenforo to fix broken images.Use the onerror attribute:
http://stackoverflow.com/questions/...uting-javascript-to-change-image-but-it-did-n
Okay so I googled onerror and the defintion is "a onerror event is triggered if an error occurs while loading an external file (e.g. a document or an image)". Execute a JavaScript if an error occurs when loading an image. That sounds like something for new posts. What I need is an addon that would do it for existing posts.An onerror attribute applied to the <img will easily accomplish what you want. I have a guide laying around here that lays out most of the work.
Can someone create an addon that removes broke images and just replaces them with the url (but not as an embedded link)?
That and lets say for instance I want to edit an existing post and delete the broken images. I can't see them unless I disable the Rich Text Editor.The only benefit I can see in replacing broken images with a working image (one that indicates image no longer available) is for SEO purposes. Is this the benefit you are seeking DRE?
That could work.Sounds like you would like to fix posts that contain broken images. Perhaps a better option would be to create a script that would create a list for you that has links to all posts which contain broken images. The script could be run any time and you can fix the broken images over time until they are all fixed.
We use essential cookies to make this site work, and optional cookies to enhance your experience.