Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for external image anti-theft chains that cannot be displayed (无法显示的外部图像防盗链解决方案) #1722

Closed
GodMeowIceSun opened this issue May 23, 2023 · 3 comments · Fixed by #1800
Labels
enhancement New feature or request

Comments

@GodMeowIceSun
Copy link
Contributor

Is your feature request related to a problem?

ome website images have anti-theft chain configurations, and whether to display "anti-theft chain images" will be determined based on the Host or Referer in the header, which will affect the recording experience. Currently, I have two ideas, but my time is limited. I will now place them here. If I have time, I will conduct functional development and hope to vote on the final implementation plan

部分网站图片存在防盗链配置,会根据Header中的Host或者Refer来判断是否展示"防盗链图片",影响记录体验,目前有两个想法,但是本人的时间有限,现在放在这里,如果有空会进行功能开发,希望能够投个票来决定最终的方案施行

Describe the solution you'd like

  1. Store images in resources
  2. Modify the image URL to the rendering server through external plugins to obtain the rendered image display

The above two options can be used in several ways to define the image scope:

  1. Determine the image address that needs to be processed by adding a new configuration called 'Anti Theft Chain URL Regular Matching'
  2. All images are processed
  3. Provide a context menu through images to convert them into corresponding rendered images
  1. 将图片存储到resources中
  2. 通过外部插件形式来修改图片URL到渲染服务器来获取渲染后图片展示

以上两种方案可以通过几种途径来做图片范围界定:

  1. 通过新增配置 "防盗链URL正则匹配" 来判断需要处理的图片地址
  2. 所有图片均处理
  3. 通过图片提供上下文菜单来转换图片为相应的渲染图片

Additional context

No response

@GodMeowIceSun GodMeowIceSun added the enhancement New feature or request label May 23, 2023
@boojack
Copy link
Collaborator

boojack commented May 26, 2023

@athurg PTAL

@usememos usememos deleted a comment from Issues-translate-bot May 26, 2023
@athurg
Copy link
Contributor

athurg commented May 26, 2023

我个人的建议是,对于外链图片,不去做一些黑科技的东西绕过防外链。

因为如果源站禁止外链,就应该尊重和遵从这一行为。

对Memos来讲,有觉得可以考虑「外部链接」这种方式的资源,默认行为从引用,改为下载到本地并使用。当然需要的话可以增加一个可选项。

对于不在意因此带来的资源占用的同学,这样是没问题的。

对于想节省资源、不下载的情况,用户我觉得应该接受源站的要求。

@Issues-translate-bot
Copy link

Issue is not in English. It has been translated automatically.


My personal suggestion is, for pictures with external links, do not do some black technology to bypass the anti-external links.

Because if the source site prohibits external links, this behavior should be respected and followed.

As far as Memos is concerned, some people think that resources in the form of "external links" can be considered, and the default behavior is changed from quoting to downloading and using locally. Of course, you can add an option if necessary.

For students who don't care about the resource occupation caused by this, this is no problem.

For those who want to save resources and not download, I think users should accept the request of the source site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants