Skip to content
This repository was archived by the owner on Sep 6, 2019. It is now read-only.

Not working with full URLs #5

@LouWii

Description

@LouWii

Hi there,

I've just updated a site from 2.5 to 3.5.4 and I have an issue with your version of imgsizer.

So when I use a File field, it outputs the full url of the image.

When I put it in an imgsizer tag

{exp:imgsizer:size src="{teaser_image}" width="340" height="340"}...{/exp:imgsizer:size}

It throws an error:

ImgSizer Error: Can't read size source file. https://mysite.com/images/uploads/Good_Morning_City_Cover_large.jpg

I checked the PHP code that throws that error.

if($this->settings['size_src'] != '') {
            if (!file_exists(reduce_double_slashes($this->settings['root_path'] . '/' . $this->settings['size_src']))) {
...

So I checked the value of reduce_double_slashes($this->settings['root_path'] . '/' . $this->settings['size_src']) and it's a mix between the url and the server path

/home/patspape/mysite.com/html/https://mysite.com/images/uploads/Good_Morning_City_Cover_large.jpg

I guess that means the add-on is not working at all with full URLs, right ? And I didn't find any parameter in EE to make the tag return the relative path instead of the full URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions