Middleman v4 webpack 3 slim image assets in slim files not working

Anyone have thoughts on this issue by chance?

1 Like

In case anyone else is looking for a solution for this issue, here is how I solved it.

First, I made sure that activate :asset_hash was turned on and set :images_dir, 'assets/images/middleman' was configured for my template assets. Next, I broke up the assets used by webpack and middleman as shown below. This allowed me to use code like this link rel='shortcut icon' href=(image_path('favicons/favicon.ico')) in my slim templates and have routable assets with hashes to break browser caching.

This looks something like this…

1 Like