Skip to content

TrimUrls is removing necessary information for JSON-LD  #66

@ahmadalfy

Description

@ahmadalfy

This class remove the URL scheme from everywhere.

\RenatoMarinho\LaravelPageSpeed\Middleware\TrimUrls::class,

This renders the JSON-LD object invalid and stop Google from properly indexing your rich snippets.

<script type="application/ld+json">
{  
   "@context":"http://schema.org",
   "thumbnailUrl":"http://sampleurl"
}
</script>

Become this:

<script type="application/ld+json">
{  
   "@context":"//schema.org",
   "thumbnailUrl":"//sampleurl"
}
</script>

It should automatically exclude these parts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions