the photo display sript is below:
<% if user.image %>
<%= image_tag user.image.url('100x20') %>
<% end %>
How can I only showing the right side of the photo by 20 x 20 on the web. it mean cut off the 80% on the left show only 20% of the whole picture.
Many thanks!
You can use RMagick on the server-side. You’ll need to
Or use whatever package manager you have. Once it’s installed you should be able
to run the following:
This will show only the top-right corner of an image.
If you want to crop you’ll need to get the linked-to image, however you’d like. Perhaps using Net::HTTP, (or from your DB, it’s unclear to me from your post)