Milk Admin

Public Assets and asset_loader

Assets normally loaded through public_html/asset_loader.php can be served directly by the web server when they exist inside public_html.


How it works

Normally, assets are resolved by asset_loader.php, which looks for files in the milkadmin and milkadmin_local folders. If the same asset is placed inside public_html, the web server serves it directly, bypassing the loader.

Why use it: in production this reduces the PHP hop and is useful for quick overrides (for example project logos or images).

Real-world example

If your layout uses these URLs:

/Theme/Assets/logo-big.webp
/Theme/Assets/logo-white.webp

you can create these files:

public_html/Theme/Assets/logo-big.webp
public_html/Theme/Assets/logo-white.webp

This way the logos are served directly by the web server and override the assets loaded via asset_loader.php.

Note: You can also override CSS and JS the same way by placing them inside public_html with the same path.
Loading...