Support » Plugin: Leira Letter Avatar » Avatar References in WP DB

  • Resolved bekind


    Dear Leira Letter Support – First off, thanks for building this wonderful plugin. I got this used through someone who was developing our website and I never realized how seamlessly it fitted well with everything.

    Now we are trying to use avatars in emails and running into an issue. Our website was using SVG avatars so far which worked great but emails cannot display SVG avatars. We need to switch to PNG to make that work. Unfortunately, I have got 100s of users with SVG avatars already. So I had two questions:
    1. If we were to somehow mass update existing SVG files to PNG files, is there a way to update the database so avatars do not break.
    2. This is related to my first question. Is there a way for Leira Letter Avatars to regenerate the avatars in mass. If so, we can change the settings to PNG and then force LLA to regenerate avatars.

    Kindly let me know and thanks for this wonderful plugin.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ariel


    Hi @pkverma99

    1- LLA does not store any avatar url in the database. If you have a theme or plugin that saves that to DB you will need to update somehow that info.

    2- User avatars are generated on demand.
    If you change to png, the plugin will generate the new avatar in png format for each user automatically when requested. No need to force the regeneration the pluguin does it automatically.

    Any question let me know.

    Thread Starter bekind


    Thanks you @arielhr1987. I do have some follow on queries:
    1. I am wondering if LLA does not store any avatar URL in the database, how is the right avatar rendered for each user. There must be some reference linking an avatar image to a user? If SVG files are converted to PNG (via some mechanism) then that reference would break hence my query.

    2. I understand that new avatars would be in PNG but if I wanted to regenerate older avatars (that are already generated in SVG), is there any mechanism in LLA that permits it?

    Thanks for the quick response.

    Plugin Author Ariel



    1. By default wordpress generates user avatars base on user email (it uses gravatar). To generate the avatar LLA uses the initials from the user name, the user email and the settings defined in plugins settings page. The combination of all of them creates a unique avatar file for the user. The plugin simple checks if the files exist, if so thats the avatar, otherwise it generates the file.
    Thats why if you change to png the combination will be different, so the plugin wont find any file and it will generate the new png avatar

    2. Old and new user avatars will be regenerated as well. If you check your uploads/letter_avatar folder you will see there, all svg avatars. after switchig you will also see the png avatars there. It will just take some time as it depends if the avatar is requested or not.

    If you still need a method to regenerate the avatar yourself rigth away after switching just open your wp admin users page, set settings page to show as most records as posible (the max value I think is 999), and them go page by page checking that the user avatar shows correctly. Thats all you need to force the regeneration.


    Thread Starter bekind


    Thanks @arielhr1987. That’s a great design choice, simple and powerful :). I misunderstood. This is perfect and answers my question.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Avatar References in WP DB’ is closed to new replies.