Resource interpreted as Document but transferred with MIME type image/jpeg

ε祈祈猫儿з 提交于 2019-11-30 18:21:45
JFK

Since your link:

https://www.filepicker.io/api/file/yknn4hWSOOm2NLZYGR3O?dl=false

doesn't have an image extension (jpg, png, gif), fancybox doesn't know what type of content needs to be handled. You need to tell it by adding the API option "type": "image" like:

$(".fancybox").fancybox({
   "type": "image"
});

That is documented here http://fancybox.net/faq, No. 6 (if using v1.3.4), or here http://fancyapps.com/fancybox/#support, FAQ tab, No. 5 (if using v2.x).

For more options how to handle the issue see here: https://stackoverflow.com/a/17554660/1055987

Another option is to append the name of the file onto the url, for example: https://www.filepicker.io/api/file/yknn4hWSOOm2NLZYGR3O+photo.png?dl=false

Filepicker.io ignores anything on the file link after the + sign to allow you to make the urls more "adapter friendly"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!