Harsha M V
Harsha M V

Reputation: 54949

Rails 4 image_tag not loading Image from Assets

I have placed all my assets in the following folders

app/assets/images/admin/*  <---- Admin Template
app/assets/images/default/* <----- Frontend Template

Now when i am trying to use the following code

<%= link_to image_tag('default/user-photo-medium-jpg', :class => 'media-object img-circle', :style => 'width: 64px; height: 64px;'), '#' %>

It generated the following code and the image does not load in the Development Environment.

<a href="#"><img style="width: 64px; height: 64px;" src="/images/default/user-photo-medium-jpg" class="media-object img-circle" alt="User photo medium jpg"></a>

Upvotes: 1

Views: 981

Answers (1)

wohlert
wohlert

Reputation: 340

Your image source points to "/images/default/user-photo-medium-jpg". Are you sure that the image has correct ending (.jpg) and not -jpg?

Upvotes: 1

Related Questions