How to Add Images in Rails

Where to insert your images?

(Do not put them in your “public/img” directory.)

Views

<%= image_tag("students/logo.jpeg")
<%= image_tag(“students/logo.jpeg”, width: ‘175px’)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jeffrey Martinez

Jeffrey Martinez

I am a graduate from Flatiron School for Software Engineer. Studied HTML, CSS, Ruby, Ruby on Rails, JavaScript, React, Redux, Sinatra, and Sqlite3