Auto imbed of images

If I paste a URL of an image file, such as:
https://i.postimg.cc/JhXCRD8N/s-l1600.jpg
... into the body of a post, that's all one sees (on my end, anyway). A url. Not the image.
Most forum engines will automatically parse and imbed the whole image in line. But DIYA does not do so (strangely, DIYA will auto imbed YouTube urls into video windows within the body of the post) .
If I click the Insert Image icon (Ctrl +P), I have the opportunity to upload from my device, but not from a URL. Is this by design?
I can use HTML to hotlink for forum (see below) but this is a very roundabout approach.
 
Founder
Joined 2000
Paid Member
Thanks for your question / suggestion.

We strongly discourage hotlinking of external images, as they suffer from link rot. Most external images that have ever been linked to have now died - I wrote a script that measured this and tried to repair the damage where possible when we moved from HTTP to HTTPS.

Better to drag and drop the image here, if you care about people being able to read your post in a few years time. A lot of those image services eventually start charging users for what was free, and the images are deleted, or they start blocking external linking of their images (fair enough - they are then getting no ad revenue to cover their costs), etc, etc.

If you really want to go against the grain and create an image tag linking to an off-site image that will leave users mystified as to what it was in the future, you are free to do so. We haven't blocked that functionality. But we have purposefully made it a ever-so-slightly laborious process so you have to think twice as to whether this is really what you want to do.

I recommend uploading images into your post, so people can enjoy your post for many years to come.
 
  • Like
Reactions: 1 users
Another forum I visit uses the same forum engine as DIYA. At the other forum, the Insert Image popup has two options: Upload (from local device) and URL (remote). That forum will take the URL and ingest it into the Forum image database. Very convenient. And it become permanent with that forum as you suggest. Look into that possibility.
But NOTHING is permanent, not even the Forums themselves. When Head-Fi upgraded their engine, a few years ago, most of their Forum links image links (saved internally at Head-Fi.org) from 10 years and prev. were destroyed.
 
Founder
Joined 2000
Paid Member
I can't comment on how other forums do things, but here at diyAudio we've always tried our best to ensure that during upgrades even old broken plugins and software still serves up images, and maintained static archives of those old legacy systems.

I've personally written scripts that have rewritten tens of thousands of image URLs in forum posts in this spirit in order to salvage them. We have substantial nginx rewrite rules to take old image URL formats and convert them to XF ones, or where that was not possible, redirect to static archives we have created to support our passion for members being able to find old content. Other forums might not have had an administrator who can code, or can or would want to write potentially damaging database scripts that might ruin millions of posts. The time it takes to write these kinds of scripts would be prohibitively expensive to hire someone else to do (and doubly so to ensure they don't muck things up). Often the money would be better spent elsewhere. I can't comment on how other sites do things, but there is usually a sane business decision involved in these determinations.

What I can comment on is that here we value long-term readability. In 2020 or so we discovered 70% of off-site images were now dead from link rot. That's why when we moved to XF, which has great drag-and-drop image support, we made the decision to deprecate the ability to easily insert off-site images, in favour of the members uploading the images themselves. Those images are guaranteed to still be shown for as long as diyAudio is around. We have been here since 1999 and I'd be betting we will still be here in 2099, unlike the images stored on whatever johnny-come-lately image host service.

Regards auto-ingestion, if a member takes the responsibility for uploading the image there is less liability on the forum. All user contributed content must abide by our terms of service. I can't comment on how or why other sites do things, but we have made various decisions based on legal advice we have received specific to the needs of operating in our jurisdiction. This is in order to lower our risk profile, and ensure that the site can indeed still be around in 2099.

I hope my response has given you sufficient information to understand why we have made these decisions. Thanks for being a diyAudio member and providing this feedback.
 
Last edited:
Founder
Joined 2000
Paid Member
Canon_40D.jpg
 
Founder
Joined 2000
Paid Member
I can confirm (using the above image, sourced from https://github.com/ianare/exif-samples/blob/master/jpg/Canon_40D.jpg), that yes, images which are uploaded have their metadata stripped. We pass images to ReSmush.IT, which does the stripping. Please note you may need to wait around 2-3 minutes after you upload, and hard-refresh the image / clear it from your image cache, so see the compressed and stripped image. Images initially appear as you upload them, and in the background as a low-priority process they are compressed and stripped and swapped in place of the original. This takes a minute or two and is done as a background process so that the experience of uploading and posting is not slowed down.
 

PRR

Member
Joined 2003
Paid Member
Why some pics get rotated when uploaded
Google that phrase. This is a WIDESPREAD problem.

If you have a file of bytes, how can you know which way is up? You might assume the first byte is top-left. But what if I held the camera sideways? Or upside-down, easy on cellphones.

This is an old problem so there are solutions. Several different solutions.

To get past your question: I have wished the forum viewer (OR my browser) had a Rotate button. But that does not seem to be common. (Win7 Preview will rotate, but only local files on my PC not files still on the Web.)
 
  • Like
Reactions: 1 users

PRR

Member
Joined 2003
Paid Member

The Two Ways an Image Can Be Rotated​

https://www.howtogeek.com/254830/why-your-photos-dont-always-appear-correctly-rotated/
This problem can occur in practically any software, from a program on your PC to a website or a mobile app. Photos may appear correctly on your computer but appear in the wrong rotation when you upload them to a website. Photos may appear correctly on your phone but incorrectly when you transfer them to your PC.
For example, on Windows 7, Windows Photo Viewer and Windows Explorer ignore the Exif Orientation tag. Windows 8 added support for the Exif Orientation tag, which continued into Windows 10. Images may appear correct on a Windows 10 or 8 PC, but rotated differently on a Windows 7 PC.


BTW, I have just been peeping EXIF data. My cellphone writes EXIF which includes the brand and name of the camera, apparently does not write the orientation tag (it is a $39 cellphone), but DOES expose my latitude and longitude to less than an inch and my elevation to a millimeter. (No, it is not that accurate! But it sure would put you on my land.) When I copy the file to PC and Preview it, it now has the full path to the file like "C:\Users\John\Porno\Goats", which might reveal my secret life.

Jason says this forum sends images to ReSmush.IT which optimizes file size, also removes EXIF by default. Does that mean it removes the Orientation tag? Or does, but first rotates the bytes so a default rendering just works? I know Jason and friends know a lot about image files and I'm sure he's doing the best job possible.
 
There are some nifty web browser extensions that can rotate images, below a couple I have used.

Extension for Chrome based browsers:
Simple Image Rotator
A very basic minimalist extension that can and does only one thing, rotate images embedded inside the web page, I tried it here on DiyA and it works for both embedded images and images one have to click on and expand first, a small annoyance is that the rotate command is done by right-click on the image to be rotated and then one have to select from the drop-down menu preferred orientation.

Extension for Firefox based browsers:
Zoom Image
A more refined extension which can rotate by images by using the mouse (according to the description it's: Alt + right-mouse-click + scroll-wheel), it's long ago I have used it as I am now mainly on Chromium browser so can't vouch for its functionality with certainty, one feedback comment mentioned it wouldn't work using Firefox under Linux but may be an isolated case so give it a try.

Edit: I did a quick test with Firefox on Ubuntu 18.04 Linux, but rotating image using mouse scroll-wheel didn't seem to work, maybe a conflict in Linux (on one hand 18.04 is already several years old and there are newer versions, and many other Linux distro's that may or may not work), or conflicting with some of the many other extensions I have in the browser, fortunately the rotation function can be reached via drop-down menu by right-clicking on the picture and select ZoomImage.

There are many other image rotating extensions but most of them can only rotate the image after open it in a new tab.
 
Last edited:
I'm using an Android device (Samsung A10 core) and no option to modify in any way a pic directly photographed to post in the forum.

The two pics of the book at post ten was taken in the same position, book and phone, with less than 5 seconds of difference using the below depicted cámara (camera) option.
 

Attachments

  • Screenshot_20230122-082502.jpg
    Screenshot_20230122-082502.jpg
    66.5 KB · Views: 47

PRR

Member
Joined 2003
Paid Member
I can't comment on how other forums do things
Another forum is about useless this morning because they host on Postimage.org which is down today. I can only infer images from blank space and text references. Aron is a programmer but somehow no web-geek. He runs a good forum for free so no gripe here.

It is like a classroom with no chalkboard. (Kids, ask your parents.)

I do prefer on-forum hosting.
 
Administrator
Joined 2004
Paid Member
I have done a good bit of testing and have found this:
  • If the image has no orientation tag it is displayed with the upper left corner of the file at the upper left. This may not be correct for your image if it's a photo.
  • If the image has the correct orientation tag, it will be rotated correctly in the browser. Once the image goes thru our compression, the image is rotated then resaved. It will now have no tags at all, but will be in the correct orientation.
  • If the image does not display correctly on your computer, most OSes have an easy lossless rotate tool. This will write an orientation tag into the image, ensuring that it should display correctly wherever it is seen.
However if your image shows correctly on your device but not here, I don't know. I would have to look at the image in question.
 
Last edited: