fix: 获取图片前缀
This commit is contained in:
@@ -164,11 +164,11 @@ class ParseData
|
|||||||
* @param string $image 图片地址
|
* @param string $image 图片地址
|
||||||
* @param bool $bool 链接OR替换
|
* @param bool $bool 链接OR替换
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
protected static function changeImages(string $image, bool $bool = true): string
|
protected static function changeImages(string $image, bool $bool = true): string
|
||||||
{
|
{
|
||||||
$prefix = cdn_Prefix();
|
$prefix = cdn_Prefix();
|
||||||
var_dump($prefix);
|
|
||||||
if (!empty($prefix) && $image) {
|
if (!empty($prefix) && $image) {
|
||||||
if (!strpos($image, 'data:image')) {
|
if (!strpos($image, 'data:image')) {
|
||||||
return $bool ? $prefix . $image : str_replace($prefix, '', $image);
|
return $bool ? $prefix . $image : str_replace($prefix, '', $image);
|
||||||
|
|||||||
Reference in New Issue
Block a user