Question : rails convert image to base64
Answered by : lior
# in Ruby
@img_base64 = Base64.strict_encode64(your_content_here)
# views
<%= image_tag "data:image/jpg;base64, #{@img_base64}" %>
Source : | Last Update : Tue, 21 Dec 21
Answered by : lior
# in Ruby
@img_base64 = Base64.strict_encode64(your_content_here)
# views
<%= image_tag "data:image/jpg;base64, #{@img_base64}" %>
Source : | Last Update : Tue, 21 Dec 21