Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6476311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:48:34+00:00 2026-05-25T06:48:34+00:00

How do I create an image_tag for a images stored in a lower level

  • 0

How do I create an image_tag for a images stored in a lower level of the default assets/images directory? Currently I am storing all of my pictures in the assets/images/pictures folder.

Heres an example. Currently using @mypic instance variable with the stored base url:
pic1.jpg

.erb file:
<%= image_tag @mypic.photoUrl %>

creates an image tag
<img src="/assets/pic1.jpg" alt="pic1">

What I want is for the src to be /assets/images/pictures/pic1.jpg

OR is ruby on rails convention to put all my heterogeneous images (eg logo, profile pics, arrow pics, landscape pics, button pics) in the image directory?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:48:35+00:00Added an answer on May 25, 2026 at 6:48 am

    The quick, easy solution would be to just write `<%= image_tag “pictures/#{@mypic.photoUrl}” %>.

    Documentation for image_tag here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to create a page with Rails where it displays the images stored
i want create image animation , i have 50 images with png format now
im trying to create an image filter in OpenGL CE. currently I am trying
I'm currently debugging a method we use to tag images with a certain text
I currently have an Array that contains some URL's to images. @images = [
All Images are 320px. The width of their container (a anchor tag) is set
I'm working on an app where users can create an account and upload images,
I have a master page that gets all its images from a table on
How to create an image under Media Library programmatically?
I'm trying to create an image using matplotlib.pyplot.imshow() . However, when I run the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.