diff --git a/app/models/user.rb b/app/models/user.rb index 2c6f31f35e00..1836948003f3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -612,7 +612,7 @@ def reload_avatar # If the user doesn't have gravatar try to get a cartodb avatar if self.avatar_url.nil? || self.avatar_url == "//#{default_avatar}" # Only update the avatar if the user avatar is nil or the default image - self.avatar_url = "//#{cartodb_avatar}" + self.avatar_url = "#{cartodb_avatar}" self.this.update avatar_url: self.avatar_url end end @@ -638,7 +638,7 @@ def avatar end def default_avatar - return "cartodb.s3.amazonaws.com/static/public_dashboard_default_avatar.png" + "/assets/unversioned/images/avatars/public_dashboard_default_avatar.png" end def gravatar(protocol = "http://", size = 128, default_image = default_avatar) diff --git a/app/views/admin/shared/_dashboard_header.erb b/app/views/admin/shared/_dashboard_header.erb index ec90cec4532f..bb28e00e933c 100644 --- a/app/views/admin/shared/_dashboard_header.erb +++ b/app/views/admin/shared/_dashboard_header.erb @@ -39,7 +39,7 @@
  • diff --git a/app/views/admin/shared/_private_header.erb b/app/views/admin/shared/_private_header.erb index 475fedc0d7ee..136e37b810cf 100644 --- a/app/views/admin/shared/_private_header.erb +++ b/app/views/admin/shared/_private_header.erb @@ -43,10 +43,10 @@ <% end %>
  • - \ No newline at end of file + diff --git a/lib/build/tasks/copy.js b/lib/build/tasks/copy.js index 8c09aaff9aff..15cc8cc3157f 100644 --- a/lib/build/tasks/copy.js +++ b/lib/build/tasks/copy.js @@ -115,6 +115,14 @@ dest: '<%= assets_dir %>/images/' }, + // avatars should be placed in a unversioned folder + { + expand: true, + cwd: "app/assets/images/avatars/", + src: ['**/*'], + dest: '<%= root_assets_dir %>/unversioned/images/avatars/' + }, + // CartoDB.js images {