chinchang / chinchang/simplezoom.js
option to specify the preview URL
- Dominant language
- JavaScript
- Stars
- 84
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the library uses the hovered thumbnail image URL to show as preview too. So basically, the thumbnail URL and preview URL are both same right now. This is wrong assumption because thumbnails generally have smaller image sizes for perf.
There should be an option to allow developers to specify the preview (large) image url for every thumbnail or all thumbnail in general.
Some ideas:
- Using attributes: `
`
- General modifier:
```
simplezoom.init({
previewUrl: { suffix: 'large-', prefix: '-2x' } // will transform every abc.png into large-abc-2x.png
});
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the library code that reads the hovered thumbnail URL and creates the preview. Review the existing initialization and image-handling behavior before choosing how per-thumbnail and global preview URLs should be represented. Done means developers can provide a separate large-image URL without changing the thumbnail URL, with the supported behavior covered by tests if the project has them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100