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

Feature Request: Generated Image Link #230

Open
IanCassTwo opened this issue Jan 12, 2021 · 3 comments
Open

Feature Request: Generated Image Link #230

IanCassTwo opened this issue Jan 12, 2021 · 3 comments

Comments

@IanCassTwo
Copy link

The Source Image Link is great but sometimes the source images can be huge. It would be nice to have a similar feature that would add a link to a defined generated image instead.

Thanks.

@siraisisatoru
Copy link

Hello.
I am not fully sure I understand your question but I guess you want some way to define the path that store generated image, right?
Indeed, you can set the input source path and output source path in the _config.yml file. And even fancier, you can set the source path as the same as the output path to replace the whole source files in the source folder.
For example, my config as follows and it works fine in the latest release.

picture:
  source: "images/"
  output: "images/"
  ...

If you are looking for the generated link, I don't think we can find any way to figure out unless there are some feedback mechanisms for the hash numbers. I remember there is a way to ignore the hash number which is mentioned in the document page and thus you can somehow get the generated figure path.
But what will be the usage for the generated link? The plugin generates the img tag with the generated picture link included...
Hope this helps.

PS: In the latest release, if the same configure is applied, the same generated file will be used without regeneration.
eg: {% picture /post/IMG_0734.JPG 16:9 %} can be used in different posts without regenerate new files.

@rbuchberger
Copy link
Owner

@IanCassTwo - That's a great idea! I can add the option to choose a particular size, or to just choose the biggest one.

@siraisisatoru - He's talking about source image linking, discussed here. Regarding ignoring the source hash, the setting you're thinking of is fast_build, which doesn't change the presence of the source hash. The generated image name is always dependent on the settings used to generate it.

Regarding your P S, that's not correct. If you don't specify a preset, you'll get the default preset, which is 400, 600, 800, and 1000, with a quality of 75. You can override any of those settings individually in _picture.yml.

@siraisisatoru
Copy link

I apologize I miss understanding the original issue with guessing and thanks for the correction. Indeed, I did configure the picture.yml file with a specific width to reduce the _site folder size which I did not mention in the reply.
The notes mentioned in the link is inaccessible now.

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

No branches or pull requests

3 participants