📜  rails 将图像转换为 base64 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:49.237000             🧑  作者: Mango

代码示例1
# in Ruby
@img_base64 = Base64.strict_encode64(your_content_here)

# views
<%= image_tag "data:image/jpg;base64, #{@img_base64}" %>