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

cover image: the original image duplicates with its md5-named copy #927

Open
Elypha opened this issue Jan 12, 2024 · 0 comments
Open

cover image: the original image duplicates with its md5-named copy #927

Elypha opened this issue Jan 12, 2024 · 0 comments

Comments

@Elypha
Copy link

Elypha commented Jan 12, 2024

What happened?

desc

I'm testing this on the starter project with no modifications for reproducibility

2024-01-13_02-33-40_396

I'm not sure if this is intended, but it seems that we get 2 images with the same 'content' under /public

reproduce

you only need the related recommendation feature in hugo config being enabled, which is by default, and hugo

codes

it seems that the following codes are related

https://github.com/CaiJimmy/hugo-theme-stack/blob/master/layouts/partials/article/components/related-content.html#L8 calls article-list/tile and the md5 duplication is created at https://github.com/CaiJimmy/hugo-theme-stack/blob/master/layouts/partials/article-list/tile.html#L8 when $imageRaw is referred to at line 9.

idea

my personal idea is to keep only the md5-named image in the build, and exclude the original unrenamed image. however, I notice that the original image name is used in some meta tag for opengraph, so this may require some more effort.

but the problem is purely about storage worries. any other method would also work so long as it prevents duplication

Hugo version

hugo v0.121.1-00b46fed8e47f7bb0a85d7cfc2d9f1356379b740+extended windows/amd64 BuildDate=2023-12-08T08:47:45Z VendorInfo=gohugoio

Theme version

current latest master: 21da06e

What browsers are you seeing the problem on?

Chrome

More information about the browser

No response

Relevant log output

No response

Link to Minimal Reproducible Example

https://github.com/Elypha/hugo-theme-stack-starter

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

No branches or pull requests

1 participant