Image Display Support

Hi Jmix Team ,

I encounter the image that unable to display properly in add-on project during login page. I already put the image inside full stalk application folder in resources/META-INF/resources/icons/icon123.png. But it can display the image after login for this image.

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns="http://jmix.io/schema/flowui/view" focusComponent="login" title="msg://LoginView.title">
    <layout alignItems="CENTER" classNames="jmix-login-main-layout" justifyContent="CENTER">
        <h1 text="Sign In"/>
        <h5 text="Login Your Account"/>
        <image resource="icons/icon123.jpg"/>
        <loginForm forgotPasswordButtonVisible="false" id="login" rememberMeVisible="true" classNames="jmix-login-main-layout">
            <form title="Welcome"
                  username="Your ID"
                  password="Your Password"
                  rememberMe="Remember me"
                  submit="Log in"
                  forgotPassword="Forgot password"/>
            <errorMessage message="msg://loginForm.badCredentials" password="msg://loginForm.errorPassword"
                          title="msg://loginForm.errorTitle" username="msg://loginForm.errorUsername"/>
        </loginForm>
    </layout>
</view>

Is it a wrong implementation ? I really appreciate your support.

Thank you
Best Regard,
Chee Hao

Hello!

Take a look at: Image didn't show up - #2 by krivopustov

You should grant access for icons to anonymous user:

@Configuration
public class UntitledSecurityConfiguration {

    @Bean
    @Order(JmixSecurityFilterChainOrder.CUSTOM)
    SecurityFilterChain iconsFilterChain(HttpSecurity http) throws Exception {
        http.securityMatcher("/icons/**")
                .authorizeHttpRequests(authorize ->
                        authorize.anyRequest().permitAll()
                );
        return http.build();
    }
}