JAML
JAML

Reputation: 215

Refinerycms get image from the editor and resize it within view

First thank you for your time to have a look into this issue.

I am a new to refinery and I have a issue to resize an image within view, I added a new page part for the image and getting image from it. I am able to get only image tag straight from the cms editor with

"<% sanitize(@page.content_for(:page_image), :tags => %w(img)) %>"

but have no idea how to resize it within the view.

Upvotes: 0

Views: 265

Answers (1)

JAML
JAML

Reputation: 215

I figured it out myself, here is how you do it,

<%= sanitize(content_fu(@page.content_for(:page_image), '96x96#c'), :tags => %w(img)) %>

Upvotes: 1

Related Questions