显示网站目录中使用了哪些图像以及未使用哪些图像

发布于 2024-11-18 19:56:26 字数 293 浏览 1 评论 0原文

这是一个有点奇怪的问题。
我一直在开发一个网站,在其开发的早期阶段,它经历了一些彻底的重新设计(实际上是其中几次),现在目录中充满了属于旧设计一部分的图像和资产。其中一些资产被重复使用,有些则没有。我上传网站的服务器空间比目前的网站要小,我知道一旦我清除了旧资源,它将适合网站空间。

我基本上想要一些神奇的工具来过滤掉哪些图像已使用,哪些图像未使用 - 所以最终我可以删除那些未使用的图像。

我在这个论坛上问这个问题是因为如果没有一个神奇的工具可以做到这一点(我真诚地希望有),我将需要编写某种脚本(也许是 PHP?)来完成此任务。

This is a little bit of a strange question.
I've been working on a website and in it's early stages of development it went through some drastic redesigns (several of them in fact) and now the directory is bloated with images and assets which were part of the old designs. Some of these assets were re-used and some were not. The server space of which I'm uploading the website is smaller than the website at the moment and I know once I clear out the old assets that it'll fit on the webspace.

I'm basically wanting some magical tool to filter out which images have been used and which have not - so ultimately I can remove the ones that have not been used.

I ask it in this forum because if there isn't a magical tool to do this (I sincerely hope there is), I'll need to write some sort of script (PHP perhaps?) to accomplish this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

因为看清所以看轻 2024-11-25 19:56:26

我从来没有找到过,并且倾向于采取手动删除旧图像的方法,我可以很容易地看出不再需要这些图像。并接受我不会得到所有这些。

相反的方法是删除所有图像,并查看需要哪些图像(使用 firebug 等来识别页面上丢失的图像)。

自动化工具的问题是 CSS 和代码中的图像可能无法被拾取。如果您在代码中根据一系列参数设置图像,任何工具如何找到它?

我希望其他人能够证明我错了......

I have never found one, and tend to take the approach of manually removing old images that I can easily tell are no longer needed. And accepting that I will not get them all.

The reverse approach to this is to remove all of the images, and see which ones are needed ( using firebug or suchlike to identify missing images on the pages ).

The problem with an automated tools is that images in css and code may not be picked up. If you set an image in code, from a range of parameters, how can any tool find that?

I hope someone else can come along and prove me wrong....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文