Skip to content

Unable to get the size of the image with cache busting or with a slash at the begining of a relative path #842

@Oktopuce

Description

@Oktopuce

There are two case that should work but doesn't:

the first one is when you have cache busting enable for a file, the path look like this:

_assets/26a1fad161d9cc7355c7ed2e7fb3021d/Images/my_image.png?1753878085

the second one is when you have a slash at the beginning of the relative file path:

/_assets/26a1fad161d9cc7355c7ed2e7fb3021d/Images/my_image.png

This will generate an exception:

(1/1) #2 Spipu\Html2Pdf\Exception\ImageException
Unable to get the size of the image [./_assets/26a1fad161d9cc7355c7ed2e7fb3021d/Images/mapa-chemical_black.png?1753878085]

This exception is generated by the function @getimagesize($src) in method Html2pdf::_drawImage()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions