Friday, April 9, 2021

Don't drop photos into your blog

USE INSERT INSTEAD

classical nude man falling helplessly through space

At the moment, though I hope things will change, do not add images into your posts by dragging them from your device or from another web page.

This method kind of works and looks okay, but there are side effects that are not immediately obvious.

Insert images from the edit toolbar instead.

Images from Blogger seem to be an exception (dragging them works), so there could be others.

Drag and drop

Blogger has from time to time supported adding an image just by dropping it on the page, but also often with problems.

An image is dragged into a blog post from a folder on my computer.

The problems this time relate to how the image is stored.

Today, the only way I can make drop work as expected is by dragging and dropping (1) an image I previously uploaded to Blogger (2) from a published blog page.

In that case, Blogger knows its own and will cleanly insert the image that is already hosted on Blogger's servers on blogspot.com.

Drag and drop hosting problems

Otherwise, dropping a photo into your post from your computer's hard drive, or from a web page, is superficially successful. It inserts the image into the post, subject to further formatting by you.

But if you open the image in its own window or tab, you will see that it is hosted at googleusercontent.com, not (as it should be) in the archive at blogspot.com

Here's why you should care.

Man falling from the sky

Where are those photos?

First of all, storing photos in the Archive (blogspot.com) is free and unlimited. We don't know if the googleusercontent images are, but maybe they count against your storage quota. And if they do....

You can't delete them! Because they do not seem to be anywhere: not in the archive, in Google Photos, or Google Drive. Note however,

Blogger makes a copy of the photo in the Album Archive, complete with its own blogspot web address. But meanwhile the image in your post is linked to a different file.

Drops from web pages, however, are not copied to the archive.

It's almost as though the googleusercontent copy is supposed to be temporary. That the file is something Google uses while processing drag and drop with the ultimate intention of using the Album Archive copy.

Which of course leads to the terrifying possibility that

The photos could be deleted. I am imagining the day when some Google employee says, whoa, that cache is getting awfully big, says here it is only temporary, guess I should clear it!

If that happens you will be out of luck, though of course you will have the fun option of reinserting those images from the blog, one at a time.

That concern is speculative. Maybe those images are fine. But there is still no way for you to manage them.

For all of these reasons, until things are clarified, my cautious recommendation at this time is to funnel your images through Blogger's "insert image" tool. So,

  • If the image is in on your hard drive, upload it
  • If it is on the web, and you have permission to use it, download a copy and upload, or use "By URL" (below)
  • If it is in your Google Photos, choose Insert Image > Photos

If it's a repeat from your blog, I guess you can use any method, but "Insert Image > Blog" is not a bad one.

Alternatives and notes

There is an alternative that also works well, "By URL." This functions as advertised for any image that has a "natural" web URL ending in, for instance, .jpg or .png.

But this won't work with Photos or Drive, which no longer have public-facing URLs from those files.

Of course, "By URL" uses the file located at the URL, and you'll be left with a hole if the file is ever deleted or moved.

Base 64

Since I am being tediously comprehensive here, a word about an old image format called Base 64.

This encodes images directly into the code for the blog post and is not hosted anywhere else at all. The code looks something like this:

/9j/4AAQSkZJRgABAQEASABIAAD/4gVYSUNDX1BST0ZJTEUAAQEAAAVIYXBwbAIgAABzY25yUkdCIFhZWiAH0wAHAAEAAAAAAABhY3NwQVBQTAAAAABhcHBsAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWFwcGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtyWFlaAAABCAAAABRnWFlaAAABHAAAABRiWFlaAAABMAAAABR3dHB0AAABRAAAABRjaGFkAAABWAAAACxyVFJDAAABhAAAAA5nVFJDAAABhAAAAA5iVFJDAAABhAAAAA5kZXNjAAAE2AAAAG5jcHJ0AAAElAAAAEFkc2NtAAABlAAAAv5YWVogAAAAAAAAdEsAAD4dAAADy1hZWiAAAAAAAABacwAArKYAABcmWFlaIAAAAAAAACgYAAAVVwAAuDNYWVogAAAAAAAA81IAAQAAAAEWz3NmMzIAAAAAAAEMQgAABd7///MmAAAHkgAA/ZH///ui///9owAAA9wAAMBsY3VydgAAAAAAAAABAjMAAG1sdWMAAAAAAAAADwAAAAxlblVTAAAAJAAAAp5lc0VTAAAALAAAAUxkYURLAAAANAAAAdpkZURFAAAALAAAAZhmaUZJAAAAKAAAAMRmckZVAAAAPAAAAsJpdElUAAAALAAAAnJubE5MAAAAJAAAAg5ub05PAAAAIAAAAXhwdEJSAAAAKAAAAkpzdlNFAAAAKgAAAOxqYUpQAAAAHAAAARZrb0tSAAAAGAAAAjJ6aFRXAAAAGgAAATJ6aENOAAAAFgAAAcQASwBhAG0AZQByAGEA6ra1vT19T3/xhCl34bnWXJUrtABwQrx577urKCw6MRk+letl9VzjWjO8koT6q+l7dPL79ep04FLERb25Ztaq93y32vpvtfyPAfh3ZPpEt7JG4xveRVjLLy2/CnuBg8kN1HTnj8j4i9n9eqqUE1TqaW0d5+ev82p9dkqeGoVJpReknbbq1b8/lodLr1zcRwzzqYzlZZFLL8/Kl3BxwO20qRkgluterkWFUqLd0vfi72bemmuq8/l+HzWLlLE4mdV6Wm1be2rXlfXXpueW6beNqWoENyolYASojZCkbhkZKhjnu2e/U193isDGeWTg5JNRj73Le97d5X/H5maqydblqPnhyKLj/wBvNb3vbTuuh9C+F7aKKCMqu1NiSso672ORt9hnG08HJyDgV5dDD/Vovkauldva/wDlv/V7HVRqSpvl3pykvd7JW669369T55/aB8VS6RC6QxFvlkZyWI2iMhl8sb8bm+6S3Yk8nAE4nD+0w/NKSb5nNO3Z3t92m59NluMqYSrzUfdbWtn1s3v11va/T5n56a7rL6ja3FxMhd7nzYWZ2JYgh5WZyGG4kKAOgGTx3ruyltum52lFS5uXrZXdru/5H1WX42tUqSVV87bTfRP89f8ANnksWmWs4aQ29u2W6uhLHIU5PXnnpkgdMmvoqsFUm5R91PaLSlb5v7+x6GIrUoVHGVLmdk29Pta+Xc//2Q==

but is page and pages long.

If this sounds too good to be true—an image you don't have to fuss with and can just paste into the blog!—it is.

Base 64 images are memory hogs that deform the pagination of blogs. Also, you would have to tinker with code to resize them or apply captions or metadata.

At one time, drag and drop formatted the dropped images as Base 64, and it was a problem.

By sheer chance, while experimenting for this blog post, the very first image I tried to drag and drop from the web was already in the Base 64 format. Dropping reproduced it that way in my test blog.

This is unlikely, but yet another reason to avoid drag and drop, at least for the time being.

In short

Adding your images with the Insert Image tool
  • organizes them in the Album Archive, where if you ever want to delete them, or reinsert them in another post, you can do so
  • does not use any of your storage quota
  • avoids Base 64 problems
Perhaps things will change and make dropping a good method once again.

And don't get me started on copy and paste.

Still images of falling are from Pixabay. The drag-and-drop animation is mine.

2 comments:

  1. blogger and everything google is such a big heap of the proverbial.
    Here is what else doesn't work.
    Before the recent blogger update we were able to right-click on a blogger picture, open it, copy the url and then insert it, into a new blogger post via insert by url.
    Now it doesn't work, you can't insert blogger pictures specifically that a way anymore.
    Also, you say pictures can be deleted if uploaded via insert and stored in the corresponding blogger blog archive.
    Not true. I have found that you can't anymore delete recent pictures from Blogger archives.

    ReplyDelete
    Replies
    1. @3133, I was unaware that "by URL" had stopped working for images hosted by Blogger in the archive. I cannot think why that should be, since those images are the actual root files and render fine in a browser window.

      I do not say anything in this post about deleting images from the Archive. Nonetheless, it is an option, from within the archive only.

      (Not a very handy one, since you can only apply it one image at a time.)

      Delete