Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails convert image to base64

# in Ruby
@img_base64 = Base64.strict_encode64(your_content_here)

# views
<%= image_tag "data:image/jpg;base64, #{@img_base64}" %>
 
PREVIOUS NEXT
Tagged: #rails #convert #image
ADD COMMENT
Topic
Name
8+9 =