diff --git a/app/uploaders/photo_uploader.rb b/app/uploaders/photo_uploader.rb index a700b37..a9dc606 100644 --- a/app/uploaders/photo_uploader.rb +++ b/app/uploaders/photo_uploader.rb @@ -1,3 +1,6 @@ class PhotoUploader < CarrierWave::Uploader::Base include Cloudinary::CarrierWave + + process convert: "jpg" + process tags: ["profile_picture"] end diff --git a/app/views/pages/_contact.html.erb b/app/views/pages/_contact.html.erb index e95836c..86f0f0d 100644 --- a/app/views/pages/_contact.html.erb +++ b/app/views/pages/_contact.html.erb @@ -3,7 +3,9 @@ <% if contact.photo.url.nil? %> <% 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 %>
<% if contact.first_name.nil? || contact.last_name.nil? %> @@ -39,7 +41,8 @@ <% if contact.photo.url.nil? %> <% 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 %>