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

Support for external images on a CDN? #27

Open
RobErskine opened this issue Sep 17, 2021 · 2 comments
Open

Support for external images on a CDN? #27

RobErskine opened this issue Sep 17, 2021 · 2 comments
Assignees

Comments

@RobErskine
Copy link

We recently moved our asset source from local storage to an Amazon S3 Bucket asset source. Our image assets went from a relative path, that used to be included in the export, to an absolute path, that is no longer being picked up.

Before:

<img src="/assets/images/logo.jpg" alt="">

After:

<img src="https://s3.us-east-1.amazonaws.com/our-bucket-name/logo.jpg" alt="">

Is there a way to include these assets in the export? We don't want to become a CDN for the partners that we export these pages for.


We tried using the customSelectors but that doesn't appear to work unless we are doing something incorrectly?

return[
    // ...
    'customSelectors' => [
        [
            'selectors'  => [
                '//img/@src',
            ],
            'assetClass' => lhs\craftpageexporter\models\ImageAsset::class,
        ]
    ],
];
@Christopher-DuCharme
Copy link

Good afternoon,

Just following up on this issue and to see if there is a solution. I'm having the same issue.

@bfopma
Copy link

bfopma commented Nov 12, 2021

+1 on this issue/request

@nstCactus nstCactus self-assigned this Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants