Skip to content

theming: unable to override images under core/img/filetypes #1290

@mikesteele81

Description

@mikesteele81

I've been working on customizing the "example" theme mainly by replacing colors and images.

I customized core/img/filetypes/folder.svg and put it under themes/mytheme/core/img/filetypes/folder.svg, but the stock file continued to be used.

I suspect this is because the file is nested within a subfolder of img:

  1. lib/private/files/Detection.php contains a line reading $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.svg');
  2. the imagePath function in lib/private/URLGenerator.php calls basename on the supplied path before working through a long decision tree to decide which file to load.
  3. The basename function in lib/private/legacy/util.php splits the supplied path on '/' characters, throwing away all but the filename.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions