Wowchemy-hugo-modules: rename featured.jpg in posts

Created on 26 Aug 2019  路  9Comments  路  Source: wowchemy/wowchemy-hugo-modules

hi, for several reasons, i would like to keep the original image filenames in posts..
instead of having hundreds of featured.jpg all around the site

coudl it be possibile to optionally name it?
since we have already the metadata:

image:
  caption: ""
  focal_point: ""
  preview_only: false

maybe we could add the filename?

stale

Most helpful comment

sure: since i have hundreds of posts, each with a main image, that i use as featured and other secondary images..

since my blog is my "archive" of all writings, and each image is a special one.. i don't want to have 100 hudreads of featured.jpg.. that would be a mess to manage/edit!
for me it's already a pain to have the post to be named index.md ...
but i really like to group posts in their own folders to have all assets together...

All 9 comments

The user never sees the filename of the featured image when browsing the site, so can you clarify what the use case is for having the ability to rename it?

sure: since i have hundreds of posts, each with a main image, that i use as featured and other secondary images..

since my blog is my "archive" of all writings, and each image is a special one.. i don't want to have 100 hudreads of featured.jpg.. that would be a mess to manage/edit!
for me it's already a pain to have the post to be named index.md ...
but i really like to group posts in their own folders to have all assets together...

This issue has been automatically marked as stale because it has not had any recent activity. The resources of the Academic team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically close soon if no further activity occurs. Thank you for your contributions.

i see that also the gohugo.io site uses a custom name for the featured images in news:
see https://github.com/gohugoio/hugoDocs/tree/master/content/en/news/0.59.0-relnotes

and it fetches the featured image by: {{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }}
(in https://github.com/gohugoio/gohugoioTheme/blob/master/layouts/news/single.html )
if we use that GetMatch by "*featured*" we could use both custom named images or the legacy featured.jpg

This issue has been automatically marked as stale because it has not had any recent activity. The resources of the Academic team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically close soon if no further activity occurs. Thank you for your contributions.

ehi.. i just discovered that you implemented this feature!! thank you!

we should update the docs: https://sourcethemes.com/academic/docs/managing-content/#featured-image

Hi @StefanoCecere could you confirm that this has been implemented? I looked for the latest commits but could not find any reference.

I just landed into this issue from the spectrum chat, after posting your very same question. Regarding the use case against using featured.jpg (or a similar name for every content) is SEO (and searchability)

If I want to search for a particular image on the site it might be almost impossible to locate based on filename. If I add an external search engine later, I will have no way to catalog any of my images based on the filename information.

If our sites are indexed by third party engines, they will get no clue about the content of our images. In this regard, Google SEO Guidelines for pictures explain:

Best Practices
Use brief but descriptive filenames and alt text
Like many of the other parts of the page targeted for optimization, filenames and alt text are best when they're short, but descriptive.
Avoid:
Using generic filenames like "image1.jpg", "pic.gif", "1.jpg" when possible鈥攊f your site has thousands of images you might want to consider automating the naming of the images.

Would you reconsider @gcushen re-opening this issue?

I'm using org-mode to generate my posts, but that should be noted in another place.

@elsatch i confir it works! i use myImageTitle_featured.jpg and it works

Great news @StefanoCecere ! So I would only need to append featured.jpg at the end of the post, wouldn't I?

Was this page helpful?
0 / 5 - 0 ratings