       <p>{@state.error.toString()}</p>
     else if @state.tutorial?
       window?.editingTutorial = @state.tutorial
-      <TutorialEditorController project={@props.project} tutorial={@state.tutorial} onDelete={@handleTutorialCreateOrDelete} />
+      <TutorialEditorController
+        project={@props.project}
+        tutorial={@state.tutorial}
+        media={@state.media}
+        onDelete={@handleTutorialCreateOrDelete}
+      />
     else
       <TutorialCreator project={@props.project} onCreate={@handleTutorialCreateOrDelete} />
 
   handleTutorialCreateOrDelete: ->
     @fetchTutorialFor @props.project
 
-
 module.exports = TutorialEditorFetcher

    loading: false
    error: null
    tutorial: null

  componentDidMount: ->
    @_boundForceUpdate = @forceUpdate.bind this

      loading: true
      error: null
      tutorial: null
    apiClient.type('tutorials').get project_id: project.id
      .then ([tutorial]) =>
        @fetchMediaFor tutorial
        @setState {tutorial}
      .catch (error) =>
        @setState {error}
      .then =>
        @setState loading: false

  fetchMediaFor: (tutorial) ->
    tutorial.get 'attached_images', {} # Prevent caching.
      .then (mediaResources) =>
        media = {}
        for mediaResource in mediaResources
          media[mediaResource.id] = mediaResource
        @setState {media}

  render: ->
    if @state.loading
