Website now supports non 1:1 aspect ratio images
This commit is contained in:
parent
87728fc459
commit
0e151e5e1d
|
@ -1,3 +1,6 @@
|
|||
class PhotoUploader < CarrierWave::Uploader::Base
|
||||
include Cloudinary::CarrierWave
|
||||
|
||||
process convert: "jpg"
|
||||
process tags: ["profile_picture"]
|
||||
end
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<% if contact.photo.url.nil? %>
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" class="avatar profile dropdown-toggle img-circle" width=65>
|
||||
<% else %>
|
||||
<%= cl_image_tag contact.photo, class: "profile avatar dropdown-toggle img-circle", width:65%>
|
||||
<%= cl_image_tag(contact.photo, class: "profile avatar dropdown-toggle img-circle", width:65, transformation: [
|
||||
{ gravity: "face:auto", width: 100, height: 100, radius: "max", crop: "crop" }
|
||||
])%>
|
||||
<% end %>
|
||||
<div class="text text-color">
|
||||
<% if contact.first_name.nil? || contact.last_name.nil? %>
|
||||
|
@ -39,7 +41,8 @@
|
|||
<% if contact.photo.url.nil? %>
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" class="avatar profile dropdown-toggle img-circle modal-picture" width=150>
|
||||
<% else %>
|
||||
<%= cl_image_tag contact.photo, class: "profile avatar dropdown-toggle img-circle modal-picture", width:150%>
|
||||
<%= cl_image_tag(contact.photo, class: "profile avatar dropdown-toggle img-circle modal-picture", width:150, transformation: [
|
||||
{ gravity: "face:auto", width: 100, height: 100, radius: "max", crop: "crop" }])%>
|
||||
<% end %>
|
||||
<div class="modal-text">
|
||||
<h4 class="modal-title" id="myModalLabel">Calling</h4>
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
<% if current_user.photo.url.nil? %>
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" class="avatar dropdown-toggle img-circle">
|
||||
<% else %>
|
||||
<%= cl_image_tag current_user.photo, class: "avatar dropdown-toggle img-circle"%>
|
||||
<%= cl_image_tag(current_user.photo, class: "avatar dropdown-toggle img-circle", transformation: [
|
||||
{ gravity: "face:auto", width: 100, height: 100, radius: "max", crop: "crop" }
|
||||
])%>
|
||||
<% end %>
|
||||
</div>
|
||||
<ul class="dropdown-menu dropdown-menu-right polyglot-dropdown">
|
||||
|
|
Loading…
Reference in New Issue