devbean / obsidian-wordpress

An obsidian plugin for publishing docs to WordPress.
https://devbean.github.io/obsidian-wordpress
Apache License 2.0
160 stars 22 forks source link

How to post images #33

Open MAWSpitau opened 1 year ago

MAWSpitau commented 1 year ago

Hi there,

the plugin worked pretty well, but I am not able to post images. Is it a bug or a feature

Using REST API by applikation

Greetings Marcel

devbean commented 1 year ago

Did you mean images in notes using such syntax like

![The San Juan Mountains are beautiful!](/assets/images/san-juan-mountains.jpg "San Juan Mountains")

?

Thus do you mean it should be replaced to some abstract links?

weqoocu commented 1 year ago

可以使用图床: 5.1.230204 为obsidian创建图床的过程:Picgo+腾讯云COS+插件 - 酷口家读书会

devbean commented 1 year ago

可以使用图床: 5.1.230204 为obsidian创建图床的过程:Picgo+腾讯云COS+插件 - 酷口家读书会

是的,不过这样就远超过一个 WordPress 相关插件的职能了,这样的功能完全可以作为一个独立的插件,而且是一个相当大的插件。所以,最好能简化一些。

weqoocu commented 1 year ago

这个功能已经有其他插件实现,不需要去实现,wordpress专注于自己发布功能上即可,图片的发布,应该用其他方案

MAWSpitau commented 1 year ago

Did you mean images in notes using such syntax like

![The San Juan Mountains are beautiful!](/assets/images/san-juan-mountains.jpg "San Juan Mountains")

?

Thus do you mean it should be replaced to some abstract links?

My image-Link looks like that in obsidian:

![[IMG_20230408_211806.jpg]]

Obsidian shows it pretty well, bu in wordpress, I online get that code and no image is uploaded.

Greets MAW

MAWSpitau commented 1 year ago

Damn. Pressed the wrong button. This is not closed, yet.

DudeThatsErin commented 1 year ago

Did you mean images in notes using such syntax like

![The San Juan Mountains are beautiful!](/assets/images/san-juan-mountains.jpg "San Juan Mountains")

? Thus do you mean it should be replaced to some abstract links?

My image-Link looks like that in obsidian:

![[IMG_20230408_211806.jpg]]

Obsidian shows it pretty well, bu in wordpress, I online get that code and no image is uploaded.

Greets MAW

Do images upload using the ![image here](imagehere.jpg) syntax?

lumenpink commented 1 year ago

Do images upload using the ![image here](imagehere.jpg) syntax?

Hi!

I tried. It creates the link in post correctly, but it doesn't upload the image.

Anyway, thanks for the great plugin!

devbean commented 1 year ago

Now the plugin could recognize ![[img]] syntax, upload the local file to wordpress. Also there is a setting option for whether using the URL wordpress returned to replace orignal image path or not.

owrede commented 1 year ago

Just an idea: Maybe add a parameter to set a featured image...?

devbean commented 1 year ago

Just an idea: Maybe add a parameter to set a featured image...?

That's a great idea but how to set which image should be featured? Should we add a sepecial flag in markdown source? Or just set in publish modal?

ghostcode commented 11 months ago

Now the plugin could recognize ![[img]] syntax, upload the local file to wordpress. Also there is a setting option for whether using the URL wordpress returned to replace orignal image path or not.

为什么支持的是 ![[img]] 这种语法?要是这种语法 obsidian 里怎么展示图片?markdown 的图片语法不是下面这种吗?

![](images/xxxx.png)
devbean commented 11 months ago

Now the plugin could recognize ![[img]] syntax, upload the local file to wordpress. Also there is a setting option for whether using the URL wordpress returned to replace orignal image path or not.

为什么支持的是 ![[img]] 这种语法?要是这种语法 obsidian 里怎么展示图片?markdown 的图片语法不是下面这种吗?

![](images/xxxx.png)

我是参考的 Obsidian 的语法文档:https://help.obsidian.md/Linking+notes+and+files/Embedding+files#Embed+an+image+in+a+note,好像没有考虑 markdown 的语法。

ghostcode commented 11 months ago

Now the plugin could recognize ![[img]] syntax, upload the local file to wordpress. Also there is a setting option for whether using the URL wordpress returned to replace orignal image path or not.

为什么支持的是 ![[img]] 这种语法?要是这种语法 obsidian 里怎么展示图片?markdown 的图片语法不是下面这种吗?

![](images/xxxx.png)

我是参考的 Obsidian 的语法文档:https://help.obsidian.md/Linking+notes+and+files/Embedding+files#Embed+an+image+in+a+note,好像没有考虑 markdown 的语法。

后面是不是考虑兼容下,Obsidian 的设置里:

image

我的默认是关闭,所以插入图片就用了 markdown 模式。但是我打开设置,重新写了一篇文章,发表后还是没有图片:

image

我使用的版本:

image

请问还需要设置什么吗?