**[Abhinay Agarwal](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=abhinay)** opened **[MJAVADOC-806](https://issues.apache.org/jira/browse/MJAVADOC-806?redirect=false)** and commented For modular projects, inside apidocs a separate directory with the module name is created. All class files are placed inside this directory, along with the `module-summary.html`. For non-modular projects, html against all class files are directly placed in apidocs. This works with no issues until I want to include doc-files. These files are placed directly inside apidocs irrespective of whether it is a modular or non-modular project, which breaks the html files if I want to move from non-modular setup to modular. javadoc plugin should check and place the doc-files inside the module directory if the project is a modular project. Also, I found that doc-files are copied in modular project only when I set \<docfilessubdirs>true\</docfilessubdirs> where as, it is copied in non-modular setup irrespective of this flag. Any particular reason for this behaviour? Here is a sample project: https://github.com/abhinayagarwal/JavadocTest It tries to add an image to the javadoc. Deleting the `module-info.java` file will create html files with images, as the doc-files are present in the correct directory relative to the html files. If you run javadoc goal with module-info.java, the image in doc-file is placed out the `module` directory, breaking the html. --- **Affects:** 3.8.0