Resources by type "pdf" not working anymore

I had the following statement in one of my hugo templates

{{ with .Resources.ByType "pdf" }}

with version v0.80.0 this is not working anymore. I saw the follwoing note in the documentation of page resources, but it has nothing to do with pdf’s not being a resource type anymore?!

New in v0.80.0 Note that we in Hugo v0.80.0 fixed a bug where non-image resources (e.g. video) would return the MIME sub type, e.g. json .

I consider this a bug. My current workaround is

{{ with .Resources.Match "*.pdf" }}

If the workaround retrieves your resource (that is a PDF) then use a tool like debugprint to see what exactly Hugo thinks the resource type is:

I would assume it’s something with more info like application/pdf or such. `.Resources.ByType “*pdf” might do the trick then. Let’s find out if this is a bug or if it’s a weird resource type.