• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • dedecms
  • ecshop
  • z-blog
  • UcHome
  • UCenter
  • drupal
  • WordPress
  • 帝国cms
  • phpcms
  • 动易cms
  • phpwind
  • discuz
  • 科汛cms
  • 风讯cms
  • 建站教程
  • 运营技巧
您的位置:首页 > CMS教程 >WordPress > wordpress上传图片不自动生成缩略图的解决方法

wordpress上传图片不自动生成缩略图的解决方法

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-05-13

佚名 向大家介绍了wordpress缩略图插件,wordpress缩略图,wordpress文章缩略图,wordpress自动缩略图,wordpress上传限制等相关知识,希望对您有所帮助

因为站点不需要显示这么多图片,只需要原图就OK了,所以就要修改下媒体设置。打开设置->媒体,将不需要的缩略图宽度高度都设置为0就可以了。如下图:



但是这样设置之后,还是会生成其它分辨率的缩略图,笔者猜测应该是主题的问题,于是就去主题内查找,笔者用的主题是themolio。后来在主题文件的functions.php中找到了这样的代码:


function themolio_setup() {</p> <p> /* Make Themolio available for translation.
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Themolio, use a find and replace
* to change 'themolio' to the name of your theme in all the template files.
*/
load_theme_textdomain('themolio', get_template_directory().'/languages' );
add_editor_style();
add_theme_support('automatic-feed-links');
add_theme_support('post-thumbnails');</p> <p> /**
* This sets up the image size for the grid based top-down layouts (with no sidebar).
* If you change the width/height of your content,
* you will have to modify the width and height mentioned below as well
*/
add_image_size('themolio-two-col-grid-image-nosidebar',460,300,true);
add_image_size('themolio-three-col-grid-image-nosidebar',290,200,true);
add_image_size('themolio-four-col-grid-image-nosidebar',210,150,true);</p> <p> /**
* This sets up the image size for the grid based top-down layouts (with sidebar).
* If you change the width/height of your content,
* you will have to modify the width and height mentioned below as well
*/
add_image_size('themolio-two-col-grid-image-sidebar',356,250,true);
add_image_size('themolio-three-col-grid-image-sidebar',230,150,true);
add_image_size('themolio-four-col-grid-image-sidebar',171,110,true);</p> <p> /**
* This sets up the image size for the featured image.
* If you change the width/height of your content,
* you will have to modify the width and height mentioned below as well
*/
add_image_size('themolio-featured-image',800,300,true);</p> <p> register_nav_menu('primary', __('Primary Menu', 'themolio'));</p> <p> add_theme_support('post-formats', array('link', 'gallery', 'status', 'quote', 'image', 'video'));</p> <p> if(themolio_is_wp_version('3.4')) {
add_theme_support('custom-background');
} else {
add_custom_background();
}
}
</div>

其中add_image_size就是增加缩略图设置的方法,根据需要注释掉即可。其它主题也可以依此类推,只要搜索关键词add_image_size,应当就能找到缩略图的设置。

最后生成多张缩略图的问题就搞定了。

友情提示

如果日后有需要缩略图,可以在媒体->媒体库->选择需要的图片点编辑->编辑图片,然后就可以裁剪图片了。最后报下wordpress和使用主题的版本:

wordpress是3.4.1版本
主题是Themolio,版本是1.2

</div>
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Wordpress自动提取内容中第一张图片作缩略图的方法
  • wordpress使用外链图片作为文章缩略图的方法
  • wordpress上传图片不自动生成缩略图的解决方法
  • WordPress简单三步实现首页文章显示缩略图(无插件)
  • 使用WordPress内置图片仓库制作缩略图的小技巧

相关文章

  • 2018-11-02获取WordPress当前分类文章所有标签
  • 2018-11-02WordPress 中文链接转拼音插件:SO Pinyin Slugs
  • 2017-05-13WordPress文章摘要小记
  • 2018-11-02WordPress实现网站投稿者也可以上传图片的方法
  • 2017-05-13为Wordpress博客添加MP3播放器
  • 2017-05-13WordPress新手安装教程(图文)
  • 2018-11-02WordPress主题中移除多余的评论字段
  • 2018-11-02wordpress调用指定分类文章
  • 2017-05-13WordPress中添加语音搜索功能的实现方法
  • 2018-11-02WordPress集成smtp 免插件 邮件发送功能

文章分类

  • dedecms
  • ecshop
  • z-blog
  • UcHome
  • UCenter
  • drupal
  • WordPress
  • 帝国cms
  • phpcms
  • 动易cms
  • phpwind
  • discuz
  • 科汛cms
  • 风讯cms
  • 建站教程
  • 运营技巧

最近更新的内容

    • 优化WordPress分类链接及WP-No-Category-Base的卸载方法
    • WordPress显示当前文章同分类下的文章列表
    • wordpress的优缺点有哪些?给你建站提供思路
    • WordPress网站速度慢,该如何检查原因?
    • WordPress查询某年某月文章的SQL语句
    • wordpress网站添加自定义滚动条样式
    • wordpress高级搜索功能示例:按分类搜索
    • 做WordPress主题SEO优化时 最基本的SEO问题
    • WordPress首页显示多个图片及文字友情链接的方法
    • Wordpress实现单篇文章分页显示的方法

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有