Set empty alt text on user images
This stops a stupidly long URL being shown if something goes wrong with the gravatar redirect back to the default image.
This commit is contained in:
parent
7444f21406
commit
67dbde0fde
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@ module UserHelper
|
|||
|
||||
def user_image(user, options = {})
|
||||
options[:class] ||= "user_image"
|
||||
options[:alt] ||= ""
|
||||
|
||||
if user.image_use_gravatar
|
||||
user_gravatar_tag(user, options)
|
||||
|
@ -13,6 +14,7 @@ module UserHelper
|
|||
|
||||
def user_thumbnail(user, options = {})
|
||||
options[:class] ||= "user_thumbnail"
|
||||
options[:alt] ||= ""
|
||||
|
||||
if user.image_use_gravatar
|
||||
user_gravatar_tag(user, options)
|
||||
|
@ -23,6 +25,7 @@ module UserHelper
|
|||
|
||||
def user_thumbnail_tiny(user, options = {})
|
||||
options[:class] ||= "user_thumbnail_tiny"
|
||||
options[:alt] ||= ""
|
||||
|
||||
if user.image_use_gravatar
|
||||
user_gravatar_tag(user, options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue