Markdown Monster
Upload Wordpress images to media
Gravatar is a globally recognized avatar based on your email address. Upload Wordpress images to media
  Matthew
  All
  Jun 30, 2019 @ 10:03am

Is there any way for MM to automatically upload local images to my Wordpress Media Library when publishing to Wordpress?

Gravatar is a globally recognized avatar based on your email address. re: Upload Wordpress images to media
  Rick Strahl
  Matthew
  Jun 30, 2019 @ 10:43am

No - the only uplink is via publish to Wordpress which uses the standard media upload to push images to the server. I'm not sure where those end up getting stored - it depends on the Wordpress implementation I believe but on the main Wordpress site it gets stored in regular image storage I believe.

For something more custom you'd have to create something yourself using an addin perhaps.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Upload Wordpress images to media
  Matthew
  Rick Strahl
  Jun 30, 2019 @ 11:17am

Thanks for the reply. Actually I was just looking for any kind of standard upload. When I upload to wordpress.com it doesn't seem to bring any media with it, and just leaves an <img> tag to my local PC directory which obviously ends up broken.

Gravatar is a globally recognized avatar based on your email address. re: Upload Wordpress images to media
  Rick Strahl
  Matthew
  Jun 30, 2019 @ 02:19pm

That should work. Image links are fixed, although we'd recommend relative images, not hardcoded image paths on your hard drive. You can move the images into your post folder (Drag and Drop or Paste into content from clipboard for example).

Hardcoded files should work too, but I have to check. If it doesn't that would be a bug.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Upload Wordpress images to media
  Matthew
  Rick Strahl
  Jun 30, 2019 @ 10:25pm

Ah yes thanks, it works if I use ![](image.png) style links and have the image in the same directory as the blog post.

If I use the same image twice it gets uploaded twice though - can't say that I've ever done that outside of testing though! I'll see if I can report it as a low priority bug anyway.


edit: Github search is good! Whilst posting the bug I found this : https://github.com/RickStrahl/MarkdownMonster/issues/455. It is effectively the same issue and the same resolution worked (using ReplacePostImagesWithOnlineUrls). Although I see your point about Wordpress having some responsibility for this bug, I do think you might consider doing something to reduce the learning curve for your users a bit when it comes to blog images!

Gravatar is a globally recognized avatar based on your email address. re: Upload Wordpress images to media
  Rick Strahl
  Matthew
  Jul 1, 2019 @ 09:22am

using ReplacePostImagesWithOnlineUrls

There are no good solutions here unfortunately due to the madness that is WordPress. For most people it's perfectly fine to upload images each time. WP will upload each time and store the images, but the post will display the correct one, so typically that is the right approach.

ReplacePostImagesWithOnlineUrls works well too and removes that image re-upload issue, but it's not something that I think would be good put front and center into the UI - it'd be confusing as heck, especially for other platforms.

It's probably time to rework some of the Blog functionality at some point to make it all flow a little better anyway.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Upload Wordpress images to media
  Rick Strahl
  Matthew
  Jul 1, 2019 @ 09:53am

Ah yes thanks, it works if I use style links

Relative paths are preferred definitely just in general - it makes things much easier when moving files around in which case you don't break the links.

However, image uploads should still work with fixed file paths as the files are read and uploaded individually anyway.

Can you file an issue for that on Github with a repro case?

+++ Rick ---

© 1996-2019