You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When I add Faker.Image() to the _data/data.json it creates the src link but no image.
An example src it generates is : /var/folders/7z/jk7wgm2x16l_vl_qs9r0vxmm0000gq/T/7c7e4c2e39293c4027572b87f8c3d7c6.jpg
The text was updated successfully, but these errors were encountered:
Noting here @AnthonySGeorge that we're looking to address this in the v10 release and backport it to v9. Since this is PL based, you obviously won't be able to just update a dependency but we'll at least have a solution.
It writes an image file to any path on a filesystem
It let's the actual return path represent a different path
In other words, Faker.image()should let us write a file to /dist/images/random.jpg but return a value from data.json as, say, just images/random.jpg. In the current state of Pattern Lab Starter - which is based off of the Drupal Edition of Pattern Lab which in turn uses the PHP Faker plugin - this is not happening.
Captured in this issue here you'll see that the PHP Faker plugin is NOT taking any other arguments other than the first sent to it, meaning that writing a file to a filesystem works, but returning a path to Pattern Lab that is usable does not.
@AnthonySGeorge, I think you'll find that the actual image is writing to the filesystem, but it's of course at a path unusable by your running Pattern Lab.
But this does bring up a more important point: don't use Faker.image(). It will write dozens or hundreds of images to a filesystem. It also adds a lot of time to the PL compile time.
Description:
When I add Faker.Image() to the _data/data.json it creates the src link but no image.
An example src it generates is : /var/folders/7z/jk7wgm2x16l_vl_qs9r0vxmm0000gq/T/7c7e4c2e39293c4027572b87f8c3d7c6.jpg
The text was updated successfully, but these errors were encountered: