Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local videos not getting copied as images #33

Closed
krishvk opened this issue Jul 23, 2023 · 4 comments · Fixed by #36
Closed

Local videos not getting copied as images #33

krishvk opened this issue Jul 23, 2023 · 4 comments · Fixed by #36

Comments

@krishvk
Copy link

krishvk commented Jul 23, 2023

It looks like the Videos are supposed to be placed only in _static/ directory. I had to learn this hard as images will be copied automatically and linked accordingly. It would be nice if the videos are also auto-managed as images.

I have a nested hierarchy and local images and videos, I am forced to give relative path for videos, while the images work just fine.

.. figure:: image.gif

.. video:: ../../_static/movie.mp4
@Calinou
Copy link

Calinou commented Jul 25, 2023

I believe this is a Sphinx limitation – images are only included in a top-level _images folder as they're referenced by a .. image:: or .. figure:: directive. This means that even if you rename your video's file extension, it won't work as it's not referenced by any image directive.

I'm not sure how this could be worked around from the extension side.

@krishvk
Copy link
Author

krishvk commented Jul 25, 2023 via email

@jdillard
Copy link

You can use reference from the top level, such as:

.. video:: /_static/movie.mp4

@krishvk
Copy link
Author

krishvk commented Sep 28, 2023

True, but that feels more like a workaround and not a fix. Since image work but videos do not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants