admin管理员组文章数量:1122846
I've managed to modify WP so it allows .ai and .psd uploads using the following code:
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes = array() ) {
$existing_mimes['psd'] = 'image/vnd.adobe.photoshop';
$existing_mimes['ai'] = 'application/pdf';
return $existing_mimes;
}
It's mostly working, but there's some weirdness going on in the Media Library. When uploaded, we can see the actual files and the thumbnails/attachments that WP has automatically generated.
The Illustrator file (1) is displaying fine, and you can also see its corresponding thumbnail (2). However, the Photoshop file (3) is missing the image and filename overlay, but the thumbnail is present (4).
What's also odd is that in list view, everything appears to be fine:
I've been scouring through code for hours, but I still can't work it out.
本文标签: PSD File UploadMedia Library not Displaying Thumbnail
版权声明:本文标题:PSD File Upload - Media Library not Displaying Thumbnail 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736295161a1929510.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论