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 %>
Calling
diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb
index 0369080..5c2a24d 100644
--- a/app/views/shared/_navbar.html.erb
+++ b/app/views/shared/_navbar.html.erb
@@ -15,7 +15,9 @@
<% if current_user.photo.url.nil? %>
<% 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 %>