Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Add imageProxyThumbnail to request smaller thumbnails #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

viktorjansson
Copy link

Request smaller thumbnails for images, used in duckduckgo-answerbar-templates

*/

Handlebars.registerHelper("imageProxyThumbnail", function(url) {
return DDG.getImageProxyURL(url, false, false, 204);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard coding 204 in here and wrapping it as a generic function seems odd. If it's a generic helper function, it should probably be a variable. And if 204 is hard coded, maybe it should just be a function inside the image IA.

Another approach could be added a second size argument to the regular imageProxy helper? Maybe that would be more reusable?

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

Successfully merging this pull request may close these issues.

None yet

2 participants