@Override
	public int doEndTag() throws JspException {
		
		try {
			if(this.getEmail() == null || this.getEmail().isEmpty()){
				this.setEmail("image-not-informed@gravatar-fail.com");
			}
			
			String hash = MD5.criptografa(this.getEmail());

			String url = "http://www.gravatar.com/avatar/" + hash + "?s=" + imageSize;

			String img = "<img src='" + url + "' ";
			
			if(this.getCssClass() != null && !this.getCssClass().isEmpty()){
				img += " class='" + this.getCssClass() + "'";
			}
			
			if(this.getId() != null && !this.getId().isEmpty()){
				img += " id='" + this.getId() + "'";
			}
			
			img = img + "/>";

			this.pageContext.getOut().write(img);
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		return super.doEndTag();
	}