mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated Unsplash image selector to insert larger images
no issue - the default "regular" url Unsplash provides is 1080px wide that does not work well for full-width image cards - updated to grab 2000px wide images
This commit is contained in:
parent
ffd2d88dd4
commit
0ba331ec5f
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ export default Component.extend({
|
|||
imageUrl: computed('photo.urls.regular', function () {
|
||||
let url = this.get('photo.urls.regular');
|
||||
|
||||
url = url.replace(/&w=1080/, '&w=1200');
|
||||
url = url.replace('&w=1080', '&w=1200');
|
||||
|
||||
return url;
|
||||
}),
|
||||
|
|
|
@ -78,7 +78,7 @@ export default Component.extend(ShortcutsMixin, {
|
|||
this.unsplash.triggerDownload(photo);
|
||||
|
||||
let selectParams = {
|
||||
src: photo.urls.regular,
|
||||
src: photo.urls.regular.replace(/&w=1080/, '&w=2000'),
|
||||
alt: photo.description || '',
|
||||
caption: `Photo by <a href="${photo.user.links.html}?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">${photo.user.name}</a> / <a href="https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">Unsplash</a>`
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue