       alt: @titleEditor.getText()
       width: @widthEditor.getText()
       height: @heightEditor.getText()
-      position: @positionEditor.getText()
+      align: @alignEditor.getText()
       slug: utils.getTitleSlug(@editor.getPath())
     text = if img.src then @generateImageTag(img) else img.alt
     @editor.insertText(text)

      @imagePreview.attr("src", "")
      @widthEditor.setText("")
      @heightEditor.setText("")
      @positionEditor.setText("")

  isValidImageFile: (file) ->
    path.extname(file).toLowerCase() in imageExtensions

        @widthEditor.setText("" + naturalWidth)
        @heightEditor.setText("" + naturalHeight)
        position = if naturalWidth > 300 then "center" else "right"
        @alignEditor.setText(position)
      @imagePreview.error =>
        @message.text("Error: Failed to Load Image.")
    else
