Knowledge Base: Including Images in Group Posts and Comments

The “Groups” facility in Ratburger.org is based upon the Group feature of BuddyPress, which is a plug-in (or more precisely, bolt-on) to WordPress which was intended to turn what was originally blogging software into a crude kind of social network, with emphasis on “crude”.  BuddyPress can best be thought of as a kludge hanging in a bag crookedly nailed to the side of the hack which is WordPress.  Much of the work expended in software development since the launch of Ratburger has been in fixing outright flaws and limitations of BuddyPress.  Raw BuddyPress is something to behold: group posts and comments, once posted, cannot be edited or deleted, except by an administrator, and there is near complete opacity about what is going on, with notifications completely haphazard.

The whole Groups facility is a hack.  The way a discussion group add-on to WordPress should work is self-evident to anybody who gives it a few minutes’ thought: each group should be its own little site, with its own posts and comments, but with notifications confined to members.  Posts could be promoted from groups to public pages by administrators.  All of the composition, editing, and administration functions should be identical for the main site and groups.

What we have, of course, is nothing like that.  Groups don’t work remotely like the main site, and users are constantly frustrated trying to do simple things in groups which are easy on the main site.

For example, consider including an image in your post or comment.  On the main site, you just use the “Add Media” button, upload the image, and shazam, there it is!  But in a group, you’ll look in vain for an Add Media button—groups were basically intended by the developers of BuddyPress as glorified text-only bulletin boards, and if you want to do something as 1995-era edgy as including an image in your post, you have to jump through hoops.  Here are the details of the hoops, in case you remain undeterred.

First, upload your image to the Media Library.  There’s no “Add Media” button, but you can open up another tab or window, go to the Dashboard (via the little thing that looks like a speedometer in the bar at the top left of the page), then select Media/Add New.  This will display the familiar “Upload New Media” page, where you can select an image on your local computer and upload it to Ratburger.  This does not include the image in your group post; it simply adds it to your Media Library.

Next, display the Media Library.  In the sidebar, click Media/Library and you’ll see all images you’ve uploaded, with the most recent one at top left.  Click it and you’ll see the image full sized.  Make a note (copy and paste to an external text file) the following information about the image:

  • Dimensions
  • URL
  • Alt Text

For example, for an image I uploaded some time ago, I’d note:

  • Dimensions: 640 by 425 pixels
  • URL: https://www.ratburger.org/wp-content/uploads/2018/09/S146.jpg
  • Alt Text: HDR image: total solar eclipse 2010-07-11

Now go to the group post where you wish to include the image.  Starting on a line by itself, include an HTML img tag for the image like the following:

<img src="https://www.ratburger.org/wp-content/uploads/2018/09/S146.jpg"
  width="640" height="425" class="aligncenter"
  alt="Alt Text: HDR image: total solar eclipse 2010-07-11" />

Replace the various fields with the information you’ve recorded for your image. The “aligncenter” specification will centre the image (what you usually want); you can also use “alignleft” or “alignright” if you know what you’re doing.

If your image is larger than will fit on the screen (for example, images from digital cameras), you’ll need to recalculate the width and height to rescale it to fit. You typically don’t want an image to be wider than 640 pixels, and 600 pixels is a good choice. Let’s assume you have a monster image which is 6016×4016 pixels (as produced by a Nikon D600 digital camera) and you wish it show it as 600 pixels wide. You’d specify width=“600” in the img tag, but then you need to calculate the height in order to preserve the shape (“aspect ratio”) of the image. To do this, multiply the original height by the new width divided by the original width, in this case:

4016 × (600 / 6016) ≈ 401

(round to the nearest integer), and then specify height=“401”.

When you publish your post or comment in the group, the image should now appear.

Why should something so conceptually simple as including an image in a discussion group require such contortions?  Welcome to “the software that runs one third of the Web” (which is what they say, without adding the concluding phrase, “into the ground”).  As I mock their download page:

WordPress: Worthless, and also free

4+

Users who have liked this post:

  • avatar
  • avatar
  • avatar
  • avatar

S.P.Q.Ratburger

S.P.Q.Ratburger!

As some of you may have read in a post yesterday, I have decided to cancel my subscription at another site and spend a lot more time here. As part of that decision, I have given a group that I used to run there a domum novam (new home) here on Ratburger.

The group S.P.Q.Ratburger, a Latin language group, is now open to all diners. So, if you can read, write, or even speak Latin, then stop on by.

And if you’re a total novice and just want to learn, then submit a saying or phrase, comic or serious. Once a week I will choose one, translate it, and explain the mechanics of the translation.

Hey, it’s not like you have to lead your armies across a river and spark a civil war. Stop by.

Valete!

13+

Users who have liked this post:

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar