Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caption external images #6

Closed
jdheyburn opened this issue Dec 13, 2021 · 5 comments
Closed

Caption external images #6

jdheyburn opened this issue Dec 13, 2021 · 5 comments

Comments

@jdheyburn
Copy link

Hello,

Firstly thanks for making this plugin and contributing to the community!

I embed external images using the below format:

![Image](https://pbs.twimg.com/media/FDIJ2jOUcAI8WaY?format=jpg&name=medium)

It would be good to be able to caption these too.

Thanks!

@bicarlsen
Copy link
Owner

bicarlsen commented Dec 13, 2021

I added this in Release 0.0.9, give it a try and see if it works.

Note that there seems to be a bug in Obsidian in that it does not update the alt text of external embeded images when switching between Preview and Edit mode. I address this issue in the README of the plugin and raised it as an issue on the Obsidian forum.

@jdheyburn
Copy link
Author

Very cool, thanks for the quick addition.

Would it be possible to have URLs in the caption? I feel the alt text is good to keep too in case the image cannot be loaded, so at least you have a description of what the image was. Captioning adds some context behind the image.

But I think if I did the below in pure markdown, it solves what I want (source).

| ![A picture of a night sky](http://www.storywarren.com/wp-content/uploads/2016/09/space-1.jpg) |
|:----------------------------------------------------------------------------------------------:|
|        *This is a caption of [outer space](https://en.wikipedia.org/wiki/Outer_space)*         | 

Which renders the below. Note I ran into that bug you mentioned, and kindly raised an issue for.

image

Would like to hear your POV before I close this out... thanks again!!

@jdheyburn
Copy link
Author

jdheyburn commented Dec 14, 2021

Also, not sure if this was a bug introduced in the latest version, but it seems that emojis are now duplicated for some reason when in Preview mode? I am on Obsidian 0.12.19.

## Notes 📝

With Image Caption 0.0.9 enabled:

image

With Image Caption disabled:
image

@bicarlsen
Copy link
Owner

Would it be possible to have URLs in the caption?

Unfortunately Markdown processing isn't available to plugins, and I'm hesitant to start adding in my own processing. This was raised in Issue #2 and I opened a thread in the Obsidian Forum regarding it, but it hasn't gotten any traction.

Note I ran into that bug you mentioned, and kindly raised an issue for.

It appears that the reloading error will be fixed in Obsidian version 0.13.10, so we'll have to wait for that release.

Also, not sure if this was a bug introduced in the latest version, but it seems that emojis are now duplicated for some reason when in Preview mode? I am on Obsidian 0.12.19.

I couldn't reproduce the emoji bug. Can you provide a bit more info on your system (OS, device, etc.) and how you are adding the emoji. If you know how to open the Inspector for Obsidian, it would be useful if you could send me the DOM segment with the emoji, and any related errors from the console. (If what I said didn't make any sense, just ignore it, or I'm happy to walk you through the steps if you want as well.)

@bicarlsen
Copy link
Owner

With the release of Obsidian 0.13.14, the issues regarding updating captions of external images has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants