html - why is rails image not resizing using "size =>"? -


i have simple static webpage made on rails. inside view of page, have embedded ruby code line display image called "logos.png". trying display image stretched horizontally , trying increasing size of width in pixels, 2735 x 552 pixels original size of 1735 x 552 pixels. here code:

<%= image_tag "logos.png", :size => "2735px × 552" %> 

when use code image remains same size , not increase width. tried replacing ":size =>" "size:". how can increase width using or method? thank you

it has in correct format, according docs image_tag you're using multiplication symbol reason, method uses simple x usual.

:size - supplied “{width}x{height}” or “{number}”, “30x45” becomes width=“30” , height=“45”, , “50” becomes width=“50” , height=“50”. :size ignored if value not in correct format.

= image_tag "logos.png", size: "2735x552" 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -