Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jetskis/headup

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jetskis/headup

Uploads media assets to Shopify

  • 1.0.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

sanity-plugin-headup

This is a Sanity Studio v3 plugin.

First you'll need to install the Shopify App from the App Store

Some link to the Shopify App

Installation

npm install sanity-plugin-headup

Usage

Add it as a plugin in sanity.config.ts (or .js):

import {defineConfig} from 'sanity'
import {headup} from '@jetskis/sanity-plugin-headup'

export default defineConfig({
  //...
  plugins: [headup({
    {
      "apiKey": "[keyProvidedFromShopifyApp]",
      "store": "yourshopifystore.myshopify.com"
    }
  })],
})

Then simply update any instance of image in your sanity schema with type: shopifyImage.

    ...,
    defineField({
      name: 'image',
      title: 'Image ',
      type: 'shopifyImage',
      validation: (Rule) => Rule.required(),
    }),

We also support uploading directly to a product image, this is useful if you don't want the client to worry about managing image assets in Shopify at all (You need an image for the cart and emails to be present in Shopify), you can pass options:

    options: {
      productImage: true,
      productId: `store.id` // points to the field with the shopify product Id
    },

'store.id' is the shopify product id field on the product content type, this assumes you're using the sanity-connect sync, if you're doing a manual sync make sure you specify the product id location in the document schema.

License

MIT © Kevin Green

Keywords

FAQs

Package last updated on 11 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc