There are two helpful things that Scrivener does when working with images and MMD.
- It will export all image resources (either embedded, linked, or Scriv Linked by name) into an export folder when you compile. The result would be to have your HTML file in a folder along with all of the graphics you assembled for the blog post.
- If the images are in the text files themselves, as opposed to just using MMD’s image syntax, then Scrivener will create MMD syntax for you, and subsequently convert that to HTML when you compile.
The end result is an HTML file that is all pre-linked to the graphics you need, but in this case they are probably not going to be linked to the right spot since you need their web addresses, and not the relative “same directory” links that Scrivener will use by default:
<img src="img.jpg" alt="" />
This will not work in WordPress. You probably need something more like:
<img src="/blog/media/img.jpg" alt="" />
<img src="http://www.yoursite.com/blog/media/img.jpg" alt="" />
There are a few ways this problem could be approached, but I’ll outline an easier one. What I would do—and what I have done in this precise circumstance before—is to largely ignore WordPress’s image upload tool as I find that to be inefficient (by proxy, this is probably more efficient with MarsEdit, but still I’d rather handle the images directly). What I do for most of my screenshots is use a program called Skitch, which is another screenshot application that has a handy upload facility. By default it uploads to their social network, but you can easily change this to work with your own FTP server, where the WordPress installation is, you can even give it the right folder that they should be uploaded to. SnapzProX might have a similar facility if you poke around. What Skitch does is let me put the entire URL into the clipboard after it uploads. So as I’m composing the MMD document, I just type in:
And then paste in the URL it gives me, closing off the parenthesis or supplying a title, like:
![Alt text](http://www.something.com/img.jpg "The title of the image")
So while I’m not exactly sure if that is what you mean by automatically tagging images when you import them, but if you do mean inserting appropriate HTML code in place of the image—then yes, that is something that can be done, and without any work on your part except for changing the compiler to one of the MMD compilers instead of RTFD.
That leaves images I haven’t snapped. For those I just use a regular FTP program. I use YummyFTP for this, and set up a droplet so I can just drop image files onto it and it will handle connecting to the server and uploading the images to the correct location. In that case, I need to get the URLs myself, but YummyFTP has an easy way of doing this. I just right-click on the file in the FTP browser and grab the web URL to the clipboard then follow the above instructions.
So that is how I approach it. When it comes time to publish to WordPress, I don’t use the rich edit mode, but switch over to HTML and just paste the MMD produced XHTML right into the program. When you do this, you want to only paste what is inside the
Now, that’s because I don’t use MarsEdit or any helpers. I pretty much do everything the “manual” way because frankly I find that easier than trying to coerce programs that promise “easy” into doing what I want. So I have less advice on how to integrate with MarsEdit on this score.
But at the very least if you compile out of Scrivener as MultiMarkdown -> HTML, you should get all of the images you used automatically collected into this compile folder for you, which should speed up that part of the process. Maybe MarsEdit even has a feature where you can import an HTML file and it will include all referenced images? If not that, it surely has the capacity to handle HTML imports rather than just pasting RTFD data I hope.
A more complicated solution would be to write a simple wrapper XSLT that processes XHTML back into XHTML, but only after fixing a few things, like adding the prefix part to the path of the images. Using a method like this, you could just upload your images using whatever mechanism you prefer (MarsEdit; snapshot program; FTP client) and then compile out of Scrivener to MMD->HTML with no edits. Leaving “Format: complete” off of the default meta-data list (that’s set in Compile), will also negate the need for only selecting the stuff inside of the
[b]body[/b] element, as it will only generate a “snippet” XHTML file, rather than a full valid web page.