<%= image_tag post.picture.url %>
<%= link_to "#{post.title}", post_path(post), class: "header" %>
<% end %>
<%= link_to 'Back', posts_path %>
```
new.html.erb
```markup
<%= form_with model: @post do |form| %>
<%= label_tag(:title, "Enter title of post") %>
<%= form.text_field :title %>
<%= label_tag(:picture, "Upload a picture") %>
<%= form.file_field :picture %>
<%= submit_tag "Submit" %>
<% end %>
<%= link_to 'Back', posts_path %>
```
show.html.erb
```markup
<%= image_tag @post.picture.url %>
<%= link_to "#{@post.title}", post_path(@post), class: "header" %>
<%= link_to 'Back', posts_path %>
```
And finally let's add the routes
`config/routes.rb`
```ruby
resources :posts
```
Now, restart the server and go to http://localhost:3000/posts/new. You should see two form fields, for _title_, and _picture_. Enter a text value for the title field, and upload an image/file for the picture field, and click on Submit. This should redirect you to http://localhost:3000/posts/1, displaying the title and the image.
This sums up how you can upload images to your Media Library using the SDK. The second method is more suited for RESTful applications with CRUD operations where the image is an attribute of a resource.
## Authentication parameter generation
You can use the SDK to generate [authentication](/api-reference/upload-file/upload-file#authorization-for-client-side-file-upload) parameters that are required if you want to implement client-side upload functionality using javascript or some [front-end framework](/quick-start-guides#front-end).
```ruby
# app/controllers/welcome_controller.rb
def auth_params
@imagekitio = ImageKitIo.client
@auth_params = @imagekitio.get_authentication_parameters()
end
```
```ruby
# config/routes.rb
get 'welcome/auth_params'
```
```ruby
# app/views/welcome/auth_params.html.erb