Title: ImageBase642File
Author: James Etu
Published: <strong>2021 年 6 月 8 日</strong>
Last modified: 2022 年 8 月 3 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/imagebase642file.svg)

# ImageBase642File

 作者：[James Etu](https://profiles.wordpress.org/donjajo/)

[下载](https://downloads.wordpress.org/plugin/imagebase642file.zip)

 * [详情](https://cn.wordpress.org/plugins/imagebase642file/#description)
 * [评价](https://cn.wordpress.org/plugins/imagebase642file/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/imagebase642file/#developers)

 [支持](https://wordpress.org/support/plugin/imagebase642file/)

## 描述

This plugin converts base64 encoded inline images to an absolute URL by; uploading
inline image into WordPress directory. This happens when a post is saved.

It converts this:
 `<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//
8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />`

To this:
 `<img src="https://site.com/wp-content/uploads/2021/05/post_title_id_no.
png" alt="Red dot" />`

I was working on an external editor to allow users to post on WordPress, this editor
embeds images in base64 encoded format. This makes post contents too long to load
on-page and also cannot be stored on buffer unless PHP is set to very high memory
usage.

This plugin converts the encoded base64 inline images to a link by scrapping out
the base64, decode, store to file and replace with the URL. The post content becomes
very short. This is over-engineered to prevent PHP memory limit when trying to copy
base64 encode to file. This plugin will perform each chunk copy on 76 characters,
76 bytes. This is the base64 line limit. There will never be an out of memory when
copying these images.
 And, it is faster than using regex

## 常见问题

### Does this plugin support other post types?

Currently, no. Only page and post are supported

## 评价

此插件暂无评价。

## 贡献者及开发者

「ImageBase642File」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ James Etu ](https://profiles.wordpress.org/donjajo/)

[帮助将「ImageBase642File」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/imagebase642file)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/imagebase642file/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/imagebase642file/)，或通过[RSS](https://plugins.trac.wordpress.org/log/imagebase642file/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/imagebase642file/)。

## 更新日志

v1.0.1
 – Support for product post type

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**4 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 5.1 或更高版本 **
 *  已测试的最高版本为 **6.0.12**
 *  PHP 版本 ** 7.1 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/imagebase642file/)
 * 标签
 * [convert image](https://cn.wordpress.org/plugins/tags/convert-image/)[image](https://cn.wordpress.org/plugins/tags/image/)
 *  [高级视图](https://cn.wordpress.org/plugins/imagebase642file/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/imagebase642file/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/imagebase642file/reviews/)

## 贡献者

 *   [ James Etu ](https://profiles.wordpress.org/donjajo/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/imagebase642file/)