fix unable to insert image in wysiwyg when post is new

Currently insert image through wysiwyg doesn't work if the blog post hasn't been saved once. So, this fix will solve the issue. I hope it's accepted to be merged, so everyone can take benefit of it.