[How to] Testing inline image attachments - Page 1
Forum section: electronics / general

author: IanB
author_rank: Super Contributor
timestamp: December 21, 2021, 06:15:43 pm
content: I couldn't figure out how to do this, so I am experimenting here to maybe give an example of how to do it.For instance, there should be an inline image displayed here:And this text should follow the image.

author: xrunner
author_rank: Super Contributor
timestamp: December 21, 2021, 06:18:14 pm
content: Right click the thumb and copy the link, then do this -Code:https://www.eevblog.com/forum/news/(how-to)-testing-inline-image-attachments/?action=dlattach;attach=1355732;image

author: IanB
author_rank: Super Contributor
timestamp: December 21, 2021, 06:20:52 pm
content: Quote from: xrunner on December 21, 2021, 06:18:14 pmI understand that's the workaround, but you have to do it in two steps.I'm trying to figure out the apparent "correct" way based on the attachment dialog?

author: xrunner
author_rank: Super Contributor
timestamp: December 21, 2021, 06:22:09 pm
content: Quote from: IanB on December 21, 2021, 06:20:52 pmYea but the problem is I don't think it works anymore, or at least not reliably.

author: IanB
author_rank: Super Contributor
timestamp: December 21, 2021, 06:26:25 pm
content: Quote from: xrunner on December 21, 2021, 06:22:09 pmApparently not. The attached help information does not seem to work as described?

author: DrG
author_rank: Super Contributor
timestamp: December 21, 2021, 06:35:08 pm
content: edit:ThatI think that the attachment you included is no longer applicable. There was a thread about this as I recall. Basically, you can't get it to work as it once did - there was a reason that it had to be disabled as I think it was causing other problems. The only way to do it now has already been stated in this thread.

author: IanB
author_rank: Super Contributor
timestamp: December 21, 2021, 06:38:42 pm
content: I don't recall that thread, but if so, I think the attachment options should be removed, as it is confusing the way things are.Also, I notice this article, that seems to suggest a better, or more supported, way to do it?https://custom.simplemachines.org/index.php?mod=3770

author: xrunner
author_rank: Super Contributor
timestamp: December 21, 2021, 06:40:33 pm
content: Quote from: IanB on December 21, 2021, 06:38:42 pmWon't happen. I have asked before if we could have the function repaired and I got shot down in flames. It's too dangerous to try to fix or remove, I was told.

author: DrG
author_rank: Super Contributor
timestamp: December 21, 2021, 06:53:12 pm
content: https://www.eevblog.com/forum/chat/attention-eevblog-admins-attachments-mixup/That is the thread I recall, but there have been several.The two-step solution does work.

author: PlainName
author_rank: Super Contributor
timestamp: December 21, 2021, 10:04:07 pm
content: Quote from: xrunner on December 21, 2021, 06:18:14 pmBut doing that places the full-size image in the text. Which negates the usefulness, in size (which means loading times) and space, of the BTL thumbnail.Please don't encourage people to create massive pages of just hi-res images

author: Smokey
author_rank: Super Contributor
timestamp: August 20, 2023, 11:17:36 pm
content: Step by step (tedious 2+ stage process) to get inline images, and resize so they don't show up as huge in the post:1) Write your post. Wherever you want your inline images to be in the body of your post, click the "Insert Image" button. That button is the far left option with the little mona-lisa icon, right below the BOLD icon. This will add the image tagsCode:This is a placeholder for the next step and won't actually do anything yet. Leave the tags empty.2) Attach your images to your post using the "Attachments and other options" button at the bottom. It doesn't matter what drop down option you pick, so probably just leave it as "End-of-post expandable thumbnail". (Yes I know most of those options say Inline, but it doesn't work).3) Post your post. The images should be thumbnails at the bottom, with nothing inline yet.4) Edit your post . Use the "Modify message" button on the right side of the post, with the little paper and pencil icon.5) Copy Links. For each of the thumbnail images at the bottom of the post, click them to expand them to full size. Then right click and select "Copy Image Address". Now go back into your post and paste the address into the image tags you added previously. It will look something like thisCode:https://www.eevblog.com/forum/section/post/?action=dlattach;attach=1850335;imageYou could click the "save" button and be done, but your inline images will be full size and potentially huge and obnoxious. So be a good forum citizen and do the next step too:6) Resize the images to fit the post: For each image tag, manually set a width option. Just changeCode:toCode:[img width=xxx]with xxx being the image width your want. 200 to 400 is usually a good size, but you may need to edit, save and check to see what it looks like. Repeat until your images are a good size.So the full example would be:Code:[img width=200]https://www.eevblog.com/forum/section/post/?action=dlattach;attach=1850335;imageNote:As pointed out below, using the "width" modifier on the image tag still downloads the full size image when someone loads your post. It's just resized in the browser. So if you want to be a stellar forum citizen and get 5 gold stars for effort, you can resize your images first before you upload them to save bandwidth.

author: abeyer
author_rank: Frequent Contributor
timestamp: August 21, 2023, 06:58:11 pm
content: But doing theCode:width=on an image tag doesn't actually load smaller pictures... you'restillcreating a page full of large images that have to load, and just scaling them down in the browser after. If you look at the source of the above image it's clearly still loading the full sized version of the image.

author: Smokey
author_rank: Super Contributor
timestamp: August 21, 2023, 11:15:14 pm
content: Quote from: abeyer on August 21, 2023, 06:58:11 pmIs this something anyone really cares about in the age of 5G and broadband? Maybe we should talk about 4K media streaming bandwidth before we worry about the internet breaking because of full size forum images....

author: Ian.M
author_rank: Super Contributor
timestamp: August 22, 2023, 12:30:30 am
content: Dave cares - he's paying for all the hosting and bandwidth.Many users with slower or metered connections care.Not everyone lives in a 1st world city with good connectivity . . .If you don't reduce your image resolution and filesize to make it web friendly, you are showing that either you don't care, (and so why should anyone care to help you?) or that you aren't competent to do so, in which case don't expect anything above beginner level answers.*PLEASE* only inline large images if you need to refer to them in detail in your post e.g. carefully cropped parts of large schematics you are discussing, and also be careful not to quote posts with large inlined images indiscriminately - always consider whether you can strip the image!

author: IanB
author_rank: Super Contributor
timestamp: August 22, 2023, 01:36:56 am
content: I always resize and compress images before I upload them.I have found the best free tool for this job is Microsoft Office Picture Manager. I install it on all my computers.Details on how to install it here:https://support.microsoft.com/en-au/office/where-is-picture-manager-58837c3e-34db-4904-95e8-4eca7b7c5730

author: BradC
author_rank: Super Contributor
timestamp: August 22, 2023, 01:45:29 am
content: Quote from: IanB on August 22, 2023, 01:36:56 amMe too. Just drop them in a directory and run this :Code:#!/bin/shmkdir ScaledDEST=Scaledfor i in *.jpg *.JPG ; doconvert $i -resize x800 $DEST/$idone;

author: Smokey
author_rank: Super Contributor
timestamp: August 22, 2023, 02:58:56 am
content: Quote from: Ian.M on August 22, 2023, 12:30:30 amShow me where the "you only get your question answered if you resize your images per Ian.M's liking" rule is?Threatening to shun people who don't know how to navigate the broken parts of the forum is sort of messed up.If any of this was on the radar of the forum operators they would probably actually just fix the broken image handling. As far as I know, this stuff has never worked right.

author: Ian.M
author_rank: Super Contributor
timestamp: August 22, 2023, 04:22:10 am
content: There's no such rule, because it should be common sense. Why should anyone expect to get more out of a community than they are willing to put into it? Show you don't value the time, effort and resources of others, and see how little help you get from those that care about such things!Of course you'll get replies from those that don't care, but you've just self-selected for an audience with less experience and knowledge than you originally had available to you. It may not even be conscious on the part of those that care, e.g. because its tedious to participate in a thread with large page load times (due to multiple large inline images) if you have a slow connection, they are less likely to reply, even if they have significant insight into your question.Beginners initially get a free pass - they aren't particularly invested here, don't know the culture and it would be nekulturny in the extreme to drive them off by nitpicking their posting style. OTOH answers they receive are likely to be targeted at their apparent level of understanding so may be less than complete.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 22, 2023, 04:43:20 am
content: Same here, resize and compress before uploading, so those with low speed internet won't see too slow webpages.Since the camera always names pics as PICTnnnn.JPG, I've added these few lines inside the~/.bashrcfile, to wrap theconvertLinux tool into a new bash commandwebify nnnn[ nnnn]. That can be used from the command line while being in the pics directory. It does this:convert PICTnnnn.JPG -strip -matte -resize 1024 -quality 50% -sampling-factor "2x2, 1x1, 1x1" PICTnnnn_s.jpg'for a batch of one or more pics:Code:# added webify to convert Minolta PICT to 1024 px wide and smallest possible file that still looks OK# append this content inside the '~/.bashrc' file# run 'source ~/.bashrc' for the new edits of the '~/.bashrc' to take effected without logout/loginfunction webify() {shrinked_no=0for var in "$@"dofor f in "${var[@]}"dos_file=PICT"$f".JPGfor fl in $s_filedoif [ "${fl##*.}" == "JPG" ]thend_file=${fl%.*}_s.jpgif [ -f "$d_file" ]thenecho --- skip "$fl" \(already existing "$d_file"\)elseecho Shrink "$fl" as "$d_file"convert "$fl" -strip -matte -resize 1024 -quality 50% -sampling-factor "2x2, 1x1, 1x1" "$d_file"shrinked_no=($shrinked_no + 1)fifidonedonedoneif [ $shrinked_no -eq 0 ]thenecho webify nnnn[ nnnn]echo ' - will shrink file PICTnnnn.JPG as PICTnnnn_s.jpg'echo ' - must specify only the nnnn part of the PICTnnnn.JPG'echo ' - intended to be used for Minolta DiMage Z1 files named PICTnnnn.JPG'echo ' - can take a list of arguments that might include globs/wildcards'echo ' - will not overwrite already existing *_s.jpg files'echo ' - the webify function is defined inside the ~/.bashrc file'echo ' - convert PICTnnnn.JPG -strip -matte -resize 1024 -quality 50% -sampling-factor "2x2, 1x1, 1x1" PICTnnnn_s.jpg'fi}

author: Smokey
author_rank: Super Contributor
timestamp: August 22, 2023, 04:59:02 am
content: Quote from: RoGeorge on August 22, 2023, 04:43:20 amOk. You guys are talking about many megapixel digital camera pictures. In that case, ya, probably should reduce that. But I'm not sure who's posting full size digital camera pictures besides the "post a picture of my cat" people. Forum admins set the max image file size. What is it set to?I would bet the majority of images on the forum are screenshots of datasheets and schematics and pictures of stuff people grabbed from some other place on the internet that are already small. I just checked and a full monitor screenshot using windows snip saves to a 192KB jpg file.

author: IanB
author_rank: Super Contributor
timestamp: August 22, 2023, 05:02:10 am
content: Quote from: Smokey on August 22, 2023, 04:59:02 amLike a phone camera?QuoteWhat about people who post pictures of items in the workshop or circuit boards or other such things?

author: RoGeorge
author_rank: Super Contributor
timestamp: August 22, 2023, 05:16:15 am
content: About screenshots, those have a property might worth mention: big areas of the same color, which means they are more compressible. For screenshots, PNG format would be preferable to JPG format (in terms of file size) while keeping the same quality as the original.PNG compression is lossless. JPG compression is lossy but hard to notice in a normal photo, though easily noticeable in a printscreen with sharp edges like windows and text.Also, a pic with high level of details would be less compressible, and thus will need bigger files. For example, the same area of a blank screen will end in a much smaller printscreen file than, say, the same area filled with a fine print text.

author: magic
author_rank: Super Contributor
timestamp: August 22, 2023, 05:50:12 am
content: Somewhere in 2021±1 or so the forum got a plugin which automatically recompresses all uploaded images (that's also the point when animated GIFs stopped working).All your careful compression is in vain. The uploaded image will end up compressed to a pre-set quality level, sometimes even larger than your version.As a bonus, the attachment's file size is still reported as you uploaded it, but the file served by the forum is different

author: RoGeorge
author_rank: Super Contributor
timestamp: August 22, 2023, 06:04:34 am
content: It's compression and resizing, so I think it does make a difference, but it's funny you say that, because you are on of those low speed interneters complaining when a pic is MB size, and for whom I am preparing smaller files.

author: magic
author_rank: Super Contributor
timestamp: August 22, 2023, 06:11:55 am
content: Resizing and choice of format makes a difference in file size. Compression before uploading doesn't.With JPGs you may as well upload at the original quality to minimize generation loss.If you want to preserve a JPG loslessly (maybe because it already is overcompressed to begin with) you have to put it in a ZIP or convert to PNG.

author: PlainName
author_rank: Super Contributor
timestamp: August 22, 2023, 07:44:37 am
content: Quote from: Smokey on August 21, 2023, 11:15:14 pmYes. I've previously posted that a page full of these kinds of images is very difficult to read because, when you get in at the end to see new posts, the arriving images cause the page to adjust and move everything else down. So the bit you're reading suddenly drops below the line as a big image arrives, you scroll down and then the page moves as another arrives, etc. There are threads that I would otherwise follow that I don't bother with because of this.Doesn't matter if you have 1TBit magicnet your end if it's going around half the world to get there at snail pace.

author: AndyBeez
author_rank: Frequent Contributor
timestamp: August 22, 2023, 09:07:02 am
content: 1993 : 128K bytes is a huge amount of memory2023 : 128K is barely one percent of an Instagram post.Compressing Images for upload and emailing is just goodNeticate. Wow that's a word from the good old dial-up days. Just showing my age. Again.

author: PlainName
author_rank: Super Contributor
timestamp: August 22, 2023, 01:13:28 pm
content: I don't care how much memory an image takes - that's a behind-the-scenes thing of no relevance. What Idocare about is how long I have to wait for it to appear, and whether it is in-your-face because the posted thinks it must dominate my view, or is illustrative and enlargeableifI wish to see it better.As noted above, plonking the full thing in the text fails both of those. Specifying some 'sensible' size also fails since you don't know the size of my browser window. Just use the thumbnail and if I need to see it better I can click on it, otherwise it's nicely out of the way and not detracting from the text.There are exceptions, but most inline images don't qualify.

author: EPAIII
author_rank: Super Contributor
timestamp: August 24, 2023, 10:02:19 am
content: You don't need to upload and add anything to any Windows computer to EASILY change the size of an image. Just open it in Microsoft Paint, which is included in every version of Windows in the past 15 or 20 years, and use the Resize command. You can change the size in pixels or just as a percentage. I use it all the time to change images to 800 pixels wide before uploading them to this or other BBs. But I can see reason to use a larger width for images where resolution counts, such as photos of PCBs or very complicated schematics. Some images can be even smaller than 800 pixels wide and still convey their meaning.Edit: I rather doubt that any addition to the BB software is going to increase the size of an image as I upload it. I see smaller images on this BB all the time. They obviously were not increased in size. So, out of politeness, I will continue to resize my images before uploading them. I do understand the bandwidth problems for some here and I hope that helps.You can also use Paint to trim off any unimportant parts, like extra white space - or blue or red or whatever color.Paint.net, which is a free download, is good for "Photoshop" type corrections when they are needed. Things like the color balance or bringing details out of shadows with the curve corrections.Quote from: IanB on August 22, 2023, 01:36:56 am

author: EPAIII
author_rank: Super Contributor
timestamp: August 24, 2023, 10:21:42 am
content: After spending literally hours trying to get images to appear in the text of my posts (I will try to limit that as much as possible in deference to those with speed and bandwidth problems) and discovering on my own most of what is described here, I finally found this thread.I would like to suggest to the powers to be that a link to this thread be placed where it can be seen when I and OTHERS are trying to upload photos. To me, THAT would be very helpful. It would have saved me actual HOURS of trial and error.I will try to call attention to this.

author: gnif
author_rank: Unknown
timestamp: August 24, 2023, 11:16:05 am
content: Quote from: EPAIII on August 24, 2023, 10:21:42 amThe intent is to fix this problem however it took a back burner due to other more pressing issues. I will try to give it some attention in the next week or two depending on my availability.

author: gnif
author_rank: Unknown
timestamp: October 12, 2023, 02:03:38 am
content: This has been fixed, inline images are working again finally.

author: Smokey
author_rank: Super Contributor
timestamp: October 12, 2023, 03:12:12 am
content: So what's the official process now? Does the inline tag actually work when you upload an image or do you need to do something else to get it to show up?Note: Selecting "inline expandable thumbnail" put the [ attach=1] tag in and the image showed up there. Interesting.Question.. is it possible to resize that inline thumbnail or is it just what it is?

author: gnif
author_rank: Unknown
timestamp: October 12, 2023, 03:14:10 am
content: There is no "official process", the broken feature has just been fixed. Obviously you figured it out with your test test imageQuote from: Smokey on October 12, 2023, 03:12:12 amIt is what it is, allowing people to adjust this would create a huge amount of thumbnail files on the server and could be abused.

author: IanB
author_rank: Super Contributor
timestamp: October 12, 2023, 03:29:48 am
content: Quote from: gnif on October 12, 2023, 02:03:38 amAh, that's cool. The first post of this thread is now displayed correctly!

author: magic
author_rank: Super Contributor
timestamp: October 12, 2023, 04:59:41 am
content: OMG, it really does, even my old posts are rendering as intended now

author: PlainName
author_rank: Super Contributor
timestamp: October 12, 2023, 10:02:44 pm
content: Quote from: gnif on October 12, 2023, 02:03:38 amKind of. If one clicks the thumbnail the original image opens in a new page. The previous version of this expanded the thumbnail in place, which was a bit more user friendly. Still, it's better than people posting the full 4K res PNG as a pretend thumbnailEdit: and quoted attachments don't work -the image in the above quote is shown as a link, but clicking the link just hangs until timeout.Edit2: Thumbnails below the line expand normally. It's just the inline thumbnails that open a new page.

author: IanB
author_rank: Super Contributor
timestamp: October 12, 2023, 10:53:05 pm
content: For me, I find it useful to include moderately sized and scaled images inline with the text, like the one below, rather than thumbnails. Then there is no need to click each thumbnail in order to view it.

author: PlainName
author_rank: Super Contributor
timestamp: October 12, 2023, 11:37:31 pm
content: But that defeats the point of having the thumbnail in the first place. 'Moderately sized' is dependant on many things that you don't know about, and may be small for some or huge for others. Thumbnails resolves that.

author: JoeRoy
author_rank: Regular Contributor
timestamp: October 13, 2023, 02:42:17 am
content: Let me check it.Inline full-size image, let's see.* doesn't work on "Preview"* but it's working on this post, not too bad

author: Smokey
author_rank: Super Contributor
timestamp: October 13, 2023, 03:03:59 am
content: Quote from: JoeRoy on October 13, 2023, 02:42:17 amYa, but if you can't resize the inline image.. that sucks...Sticking the hack...https://www.eevblog.com/forum/news/(how-to)-testing-inline-image-attachments/msg5021542/#msg5021542

author: IanB
author_rank: Super Contributor
timestamp: October 13, 2023, 03:06:26 am
content: Quote from: Smokey on October 13, 2023, 03:03:59 amYou can adjust the display size of the inline image like this:Code:[attachimg=1 width=400]

author: Smokey
author_rank: Super Contributor
timestamp: October 13, 2023, 06:51:44 am
content: Quote from: IanB on October 13, 2023, 03:06:26 amDoes that actually work?Update:HA! that does work. Ianb is my new personal hero. Problem solved.Thanks gnif!

author: Smokey
author_rank: Super Contributor
timestamp: October 16, 2023, 12:30:46 am
content: There is some funny business going on with the inline image in this post:https://www.eevblog.com/forum/chat/what-did-you-buy-today-post-your-latest-purchase!/msg5106000/#msg5106000Note: links to that thread get broken because of the "!"

author: hatte
author_rank: Contributor
timestamp: November 29, 2023, 02:39:58 am
content: Now we just need to publish the[ Attachment Invalid Or Does Not Exist ]as part of the "static" help text (or in a link that opens in a new tab) when authoring/modifying a post, so posters/commenters know how to use the feature. I guess that is not a trivial task to hack into this antiquated forum software.

author: Michael Craft
author_rank: Contributor
timestamp: December 26, 2023, 05:28:31 pm
content: Am testing inline images:ABChttps://www.flickr.com/photos/194366829@N05/53292554836/in/dateposted/https://live.staticflickr.com/65535/53292554836_0c111799c5.jpgDEF

author: PlainName
author_rank: Super Contributor
timestamp: December 26, 2023, 05:52:27 pm
content: Just use the forum facilities instead of reinventing another mousetrap.A bonus is the image will still show when your cheap image sharing website bites the dust through lack of income/users/competence.

author: Hawaka
author_rank: Regular Contributor
timestamp: February 15, 2024, 05:00:14 pm
content: test

author: RoGeorge
author_rank: Super Contributor
timestamp: February 15, 2024, 05:06:09 pm
content: Beware that 'Inline expandable thumbnail' when clicked it will open maximized in a new tab, which is very annoying.

author: xlzslayer
author_rank: Contributor
timestamp: April 15, 2024, 02:03:33 pm
content: testing images, don't mind me.sorry for spamming images dave-wtf that was weird, and dumb, some images dont work properly with end-of-post expandable thumbnailhad to convert it to png instead of saving it as png (from webp)

author: NightMoth
author_rank: Contributor
timestamp: May 14, 2024, 10:59:30 am
content: TestPic 1Pic 2

author: paulscout550
author_rank: Newbie
timestamp: January 02, 2025, 09:56:32 pm
content: TestTesttest

author: BradC
author_rank: Super Contributor
timestamp: January 03, 2025, 08:00:32 am
content: Quote from: paulscout550 on January 02, 2025, 09:56:32 pmScoping out the forum features?

author: hp3310a
author_rank: Regular Contributor
timestamp: March 09, 2025, 11:46:17 am
content: I still have zero luck getting inline expandable images. Using the IMG procedure yields the full size image, using attach= yields an image that, when clicked, opens a new tab. I want inline expandable.Testing the available options:attachattachimgattachurlseNT9.jpg(28.69 kB. 709x205 - viewed 48 times.)attachminiet5410ap_mainboard.jpegIMG tagOf course now that I'm looking to find an example I find none... What I'm after is like the expandable footer images but inline.

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 11, 2025, 04:57:01 pm
content: Quote from: hp3310a on March 09, 2025, 11:46:17 amAs in(Click to embiggen)perhaps?Use add suitably smallxsizeandysizein[img width=xsizeheight=ysize]URL.

author: hp3310a
author_rank: Regular Contributor
timestamp: March 13, 2025, 02:41:02 pm
content: TQuote from: Nominal Animal on March 11, 2025, 04:57:01 pmTesting right away:(click me click me)Does it work?YES!Thanks a lot!Giving width or height alone works too, so you don't have to work out the aspect ratio.[img width=150]https://www.eevblog.com/forum/news/(how-to)-testing-inline-image-attachments/?action=dlattach;attach=2521699;image[img height=30]https://www.eevblog.com/forum/news/(how-to)-testing-inline-image-attachments/?action=dlattach;attach=2521699;imageThanks again, that should make my future posts irresistible

author: PlainName
author_rank: Super Contributor
timestamp: May 24, 2025, 07:32:45 pm
content: QuoteOr perhaps not. The problem with this technique is that the full image is loaded and then scaled to a small area. So your 775K image is downloaded every time your post is viewed. Doesn't sound a lot, but a thread with many such images can become unreadable because the entire thread text is displayed, and then the images are s l o w l y filled in. Each time, the thread text moves down an arbitrary amount, and ultiimately it's just too annoying to follow.OTOH, the forum way of doing it posts just a thumbnail amount of data and is fast. Only if the viewer clicks the image is the full thing downloaded for display.

author: RoGeorge
author_rank: Super Contributor
timestamp: May 25, 2025, 01:51:31 am
content: What's the most annoying to me is the forum plugin, the one that allows to embed inside a text only the thumbnail, but when clicked, the full picture opens in a new tab, instead of being enlarged embedded inside the text.Hard to follow, and impossible to save the page with all its included pictures.Even more, if embedded with the "Inline expandable thumbnail"Code:[attach=n]then the thumbnail at the end of the post are hidden, so no way to have in the same tab both the text and pics.