WordPress - 索引页图像调整大小
我目前正在为某人设计一个由其他人设计的博客。该设计的主索引页面列出了博客中的文章。在设计的顶部有三个存储桶,其中包含最新的故事,并且它们都包含文章中的图像。
在索引页上时,所有图像都必须以与文章相同的宽高比显示。但我不能保证博客的用户(文章作者)会花时间确保图像的宽高比适合在主页上缩放。
有谁知道有什么技术可以解决这个问题吗?
它还需要在所有浏览器上工作。
I'm currently working on a blog for someone that has been designed by someone else. The design has the main index page listing articles from the blog. At the top of the design there are three buckets where the latest stories are and they all include an image from the article.
The images all have to appear at the same aspect ratio from the article when on the index page. Yet I cannot guarantee that the user of the blog (the article author) will take the time to make sure the image is the right aspect ratio to be scaled on the home page.
Does anyone know of any techniques to get around this issue?
It also needs to work across all browsers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 TimThumb,它可以调整大小并将其裁剪到正确的比例。真是太好了!
timthumb - 图像裁剪缩放调整大小管理
You can use TimThumb which can both resize and crop it to the right aspect. It is really good!
timthumb - image crop zoom resize management
那么,这些框将显示帖子及其特色图像作为缩略图?这是正确的吗?
您可以使用获取缩略图挂钩,并在functions.php 文件中设置尺寸。
但这实际上取决于您当前的代码。
这些盒子是否使用后循环?
有机会显示当前的index.php代码。
So, these boxes will display post's plus their featured images as thumbnails? Is that correct?
You could use the get thumbnail hook, and set the dimension in the functions.php file.
But it really depends on your currect code.
Are the boxes using a post loop?
An chance of showing the current index.php code.