原始答案(2019):您可以查看中提出的解决方法git-lfs/git-lfs 问题 1342 https://github.com/git-lfs/git-lfs/issues/1342:“GitHub 页面提供参考文件而不是实际的二进制文件”
The 最新的 https://github.com/git-lfs/git-lfs/issues/1342#issuecomment-467321479(自 2019 年 2 月起):
https://media.githubusercontent.com/media/_Username_/_Project_/_Branch_/_Path_to_file_
你应该更换所有_UNDERSCORED_
东西给你的
本项目中的示例:labcesi-strasbourg/labcesi-strasbourg.github.io提交 c53bd39 https://github.com/labcesi-strasbourg/labcesi-strasbourg.github.io/commit/c53bd3990c87f3ee03fb513d9fec4e4d8ad1a529
vrView.setContent({
//image: 'V0050069.jpg',
image: 'https://media.githubusercontent.com/media/labcesi-strasbourg/labcesi-strasbourg.github.io/master/V0050069.jpg',
//preview:'/url/to/amazing-512.jpg',
is_stereo: false
});
2022 年 10 月更新:Marco https://stackoverflow.com/users/376390/marco表明这可能不再有效,并且将使用以下版本:
https://github.com/labcesi-strasbourg/labcesi-strasbourg.github.io/blob/master/V0050069.jpg?raw=true https://github.com/labcesi-strasbourg/labcesi-strasbourg.github.io/blob/master/V0050069.jpg?raw=true
换句话说:
https://github.com/\ https://github.com/%5C//blob//?raw=true
上述格式适用于各种类型的媒体(jpg、webm 等)