Open Closed

logo #8757


User avatar
0
nabass created

hi how to change my logo brand using my image here is my code i followed this https://abp.io/support/questions/186/How-can-I-customize--change-logo-and-change-position

  • ABP Framework version: v8.0.2
  • UI Type: MVC

7 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, currently it should work. Here is my test result:

    namespace AbpSolution6;
    
    [Dependency(ReplaceServices = true)]
    public class AbpSolution6BrandingProvider : DefaultBrandingProvider
    {
        public override string? LogoUrl { get; } = "/images/logo/new-logo.png";
    }
    


    Can you access the image file through your browser? (https://localhost:<your-port>/images/logo/logo2.png) If you can, you may clear the browser cache.

  • User Avatar
    0
    nabass created

    hi not work, when change it to text it works but image not work and svg icon not remove

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    hi not work, when change it to text it works but image not work and svg icon not remove

    When you go to https://localhost:44344/images/logo/logo2.png, do you see the logo?

  • User Avatar
    0
    nabass created

    hi i solved it but i got a strange behavior you can check the video https://streamable.com/1fmj7p

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi @nabass

    It seems the CSS variable is loaded much more earlier than your custom logo variable. The only way to prevent this problem permanently is replacing this physical files in your application:

    /images/logo/leptonx/icon-logo.svg
    /images/logo/leptonx/icon.svg
    

    Overriding BrandingProvider also works but still there is a timing problem. When the theme's CSS file is loaded to the browser it automatcally starts download the given file from variable. Even you override, it was started download already. So replacing the original file prevents it.

    Another approach is customizing the SCSS files and build your css on your own if you have access to source code of leptonx. But replacing the source file is much more easier solution for now

  • User Avatar
    0
    nabass created

    hi mr.enisn i already did what you want but still got the same abp logo when reloading it seems like it's placeholder till my logo load i want to avoid that behavior and delete abp svg logo

  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Hello,

    Sorry for the late reply, but we missed this question because the friend dealing with the subject was on vacation. However, next Monday, the friend who is interested in the subject will return to you. Thank you for your patience.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00