Skip to content

Conversation

gijoe88
Copy link

@gijoe88 gijoe88 commented Aug 13, 2025

What does this PR change? What problem does it solve?

This change does two things:

  • adds functionalities of responsiveness, and of linkage to full size image, to the figure shortcode, same functionalities as for the cover image. The responsive is false by default, keeping current behaviour. Same for linkFullImage
  • adds usage of hugo resources to the former code, using relative links, instead of using the src from the developer. If the image is not found in the resources, takes the src.

Was the change discussed in an issue or in the Discussions before?

May well close the issue #1624 . The PR #1651 exists just for this, I saw it after starting my change.

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

Adding the responsive parameter to the figure shortcode and , on the example of cover. By default, this value is false, in order to not induce a long rendering time to existing sites with lots of images.
In much the same way, adding linkFullImage to the figure shortcode, with default false for keeping current behaviour.
After viewing PR adityatelange#1777 , replacing absolute links by relative links, and also replace the usage of src parameter in the non responsive case
This commits lets the user specify external images.
Add comments to the code, and take url parsing from adityatelange#1651. Hope @valnaumov will forgive me.
Copy link

@gijoe88
Copy link
Author

gijoe88 commented Aug 13, 2025

@valnaumov and @sammedhi both did the same fix to images in multilingual sites, in #1651 and #1777

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 this pull request may close these issues.

1 participant