Skip to main content

How do I remove TinySEO code from my theme?

Remove script control, asset preloading, lazy loading and minification changes from your theme.

Written by Julia

TinySEO can change your theme code in these ways:

  1. Script control code (one line in theme.liquid and the snippet tiny-script-control.liquid)

  2. Asset preloading code (one line in theme.liquid and the asset tiny-img-link-preloader.js)

  3. Lazy loading (adds loading="lazy" to image tags in your theme's Liquid files)

  4. CSS/JS minification (minifies your CSS and JavaScript files)

  5. agents.md and LLMs.txt files (templates added to your theme when you save them in TinySEO)

App embeds and the Heading 1, Heading 2 and Heading 3 blocks don't add code to your theme files. Turn the app embeds off and remove the blocks in the theme editor.

Uninstalling TinySEO does not remove any of this code from your theme, and after uninstalling, the app can't remove it for you anymore. So remove it before you uninstall.

Before making any changes to a theme, ensure you create a backup of the theme. This backup will be essential in case any changes are made incorrectly and you need to restore quickly.

Script control

Script control can't be turned off in the app. Message us in chat and we'll help, or remove it manually:

  1. Open your theme.liquid file.

  2. Search for "tinyscript".

  3. Locate the line that resembles the following:

    {%- if tinyscript -%}{{ content_for_header }}{%- else -%}{% render 'tiny-script-control' %}{%- endif -%}
  4. Replace that line with just:

    {{ content_for_header }}
  5. Save the changes to your theme.liquid file.

After the change it should look like this:

Asset preloading

The easiest way is to open Preload assets in TinySEO and click Deactivate. This removes the line from theme.liquid and deletes tiny-img-link-preloader.js. It only changes your live theme. For any other theme, remove the code manually:

  1. Open your theme.liquid file.

  2. Search for "tiny-img-link-preloader".

  3. Locate the line that resembles one of the following:

    <script src="{{ 'tiny-img-link-preloader.js' | asset_url }}" defer></script>
    {{'tiny-img-link-preloader.js' | asset_url | script_tag }}
  4. Remove the line entirely.

  5. Save the changes to your theme.liquid file.

Remaining files

After removing the lines above, you can safely delete the files TinySEO created:

  1. snippets/tiny-script-control.liquid

  2. assets/tiny-img-link-preloader.js

When you open each of the files, you will see a delete button. Click on it to confirm deletion, and those files will be deleted!

Lazy loading

Lazy loading can't be undone in the app. To remove it, restore a backup of your theme made before you activated it. When you unlocked lazy loading or CSS/JS minification, TinySEO created a backup named "Copy of" plus your theme name in Online Store > Themes. Theme changes made after that backup are not in it.

CSS/JS minification

Open CSS/JS minification in TinySEO and click Restore next to each file under Minified assets. The fastest way to restore all files at once is to publish a theme backup. TinySEO keeps an original copy of every minified file (for example base-backup.css). You can delete these copies after restoring.

agents.md and LLMs.txt

Click Reset agents.md file on the agents.md page in TinySEO. For LLMs.txt, turn off Generate this file for each file in AI content setup (LLMs.txt) and save.

Did this answer your question?